作者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/cn.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