看板 [ java ]
討論串[問題] 字串比較的問題
共 8 篇文章
首頁
上一頁
1
2
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者godfat (godfat 真常)時間19年前 (2007/02/18 15:22), 編輯資訊
0
0
4
內容預覽:
如果要搜尋的目標不多的話,線性搜尋不見得比較慢,可能還更快. --. #!/usr/bin/ruby [露比] /Programming (Kn|N)ight/ 看板《Ruby》# if a dog nailed extra legs that http://www.ptt.cc/bbs/Ruby/
(還有151個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者qrtt1 (愚人)時間19年前 (2007/02/18 15:11), 編輯資訊
0
0
0
內容預覽:
那直接改 Map 也很快 XD. --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 61.224.173.253.

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者H45 (!H45)時間19年前 (2007/02/18 14:32), 編輯資訊
0
0
0
內容預覽:
[...][...]. 這邊仍然使用了iterator, 循序檢查, 花費時間 O(n). 如果改用Jump table, 或是Event trigger, 將可縮短花費時間 O(1). --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 123.192.62.227.

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者qrtt1 (愚人)時間19年前 (2007/02/18 01:52), 編輯資訊
0
0
0
內容預覽:
用 Hash 是個好方法 :P. ============================================================. // 建立一個命令的範本,用 toString 直接傳回命令的名稱. public abstract class AbstractComman
(還有2118個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者PsMonkey (痞子軍團團長)時間19年前 (2007/02/17 23:33), 編輯資訊
0
0
2
內容預覽:
public static int findStringInArray(String cmd, String[] array){. for(int i=0; i<array.length; i++){. if(array[i].equal(cmd)){. return i;. }. }. retur
(還有287個字)
首頁
上一頁
1
2
下一頁
尾頁