作者godfat (godfat 真常)
看板java
標題Re: [問題] 字串比較的問題
時間Sun Feb 18 15:22:11 2007
※ 引述《H45 (!H45)》之銘言:
: [...]
: 這邊仍然使用了iterator, 循序檢查, 花費時間 O(n)
: 如果改用Jump table, 或是Event trigger, 將可縮短花費時間 O(1)
如果要搜尋的目標不多的話,線性搜尋不見得比較慢,可能還更快
--
#!/usr/bin/ruby [露比] /Programming (Kn|N)ight/ 看板《Ruby》
# if a
dog nailed
extra legs that
http://webptt.com/m.aspx?n=bbs/Ruby/index.html
#
walks like an octopus, and Welcome ~
Ruby@ptt~
#
talks like an octopus, then
◢█◣ http://www.ruby-lang.org/
# we are happy to treat it as
█ http://www.ruby-doc.org/
# if it were
an octopus.
◥ ◤ http://www.rubyforge.org/
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.135.28.18