回複:This definitely works, but uses too much memory. I

來源: sub101 2009-03-04 08:01:07 [] [舊帖] [給我悄悄話] 本文已被閱讀: 次 (197 bytes)
回答: 回複:請教一ALGORITHM問題sub1012009-03-04 06:23:58
3 million words are about 30 million characters. That is 30MB. We need an array and target string. Therefore we triple the memory usage, which is 90MB. For modern computers, that is not a big deal.
請您先登陸,再發跟帖!

發現Adblock插件

如要繼續瀏覽
請支持本站 請務必在本站關閉/移除任何Adblock

關閉Adblock後 請點擊

請參考如何關閉Adblock/Adblock plus

安裝Adblock plus用戶請點擊瀏覽器圖標
選擇“Disable on www.wenxuecity.com”

安裝Adblock用戶請點擊圖標
選擇“don't run on pages on this domain”