- 程序有所改变。发帖如还有问题请报告
- 【征集】西西河的经济学,及清流措施,需要主动参与者,『稷下学宫』新认证方式,24年网站打算和努力目标
主题:求教大家一个算法问题 -- looklook
共:💬24 🌺10 新:
As for contains() implementation, check out Sun's JDK implementation. I believe it's O(1) as the Javadoc declared.
Well, there are always two solutions for the classic issue. One is the solution you mentioned above, and the other is the one I gave.
bigbug
- 相关回复 上下关系8
压缩 3 层
🙂bigbug可能写得比较简单吧 1 【子衿】 字226 2006-05-05 13:13:21
🙂Implementation using HashSet. bigbug 字771 2006-05-05 22:33:20
🙂hash是对的。 但是, 你的contains()如何最快实现呢! 萝卜酒 字0 2006-05-06 01:12:11
🙂There are always two solutions for the classic issue.
🙂不是这样解决的 looklook 字132 2006-05-05 13:42:39
🙂先排再找有什么问题吗? 1 孔老大 字224 2006-05-05 16:14:31