问!谁能帮我解这道java题?感谢····
所在版块:社会百科 发贴时间:2003-10-09 02:05

用户信息
复制本帖HTML代码
高亮: 今天贴 X 昨天贴 X 前天贴 X 
write a program that reads an unspecified number of integers and finds the one that has the most occurrences. your input ends when the input is -1.for example, if you entered 2 3 40 3 5 4 7 3 3 2 -1, the number 3 occurred most often. enter one number at a time. if several numbers have the most occurrences, all of them should be reported. for example, if both 9 and 3 occur the same times, both should be reported.
.
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!

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