Try his
所在版块:社会百科 发贴时间:2003-10-09 03:43

用户信息
复制本帖HTML代码
高亮: 今天贴 X 昨天贴 X 前天贴 X 
Implement in Linked List, with each node containing a number and its frequency.

Whenever a number is input, it tries to find it if it's in the List.

If so, add its frequency by 1.

If not, add a tail containing the number into the Linked List and set its frequency to 1.

At the end, scan the whole List and try to find out the nodes containing max frequency.
.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!

Many events have slipped by.
And you are here, now, always.

People are not memories that you can put into words. They live.

 相关帖子 我要回复↙ ↗回到正文
问!谁能帮我解这道java题?感谢···· tonymmm   (415 bytes , 717reads )
Use Hashtable 豫北闲人   (232 bytes , 335reads )
B+ tree better... 今夜独自发呆   (0 bytes , 302reads )
If there is no memory limitation 香陵居士   (111 bytes , 277reads )
Try his 辰星   (361 bytes , 304reads )
Linear search is expensive cigar   (0 bytes , 235reads )
But for his question it is ok. 辰星   (35 bytes , 207reads )