Find k most repeating elements
Given a list and a number k, print out the top k most repeating elements in the list.
1. Use hashmap to store the pair of number and count.
2. Use priority queue to store the hash node based on
原创
2015-06-05 02:15:25 ·
262 阅读 ·
0 评论