1. Two Methods of hashmap traversal in Java
The following two methods are recommended:
Iterator iter = hmap. entryset (). iterator ();
Map. Entry entry = (Map. Entry) ITER. Next ();
(INT) entry. getkey ();
(INT) entry. getvalue ();
Http://www.cnblogs.com/meieiem/archive/2011/11/02/2233041.html
2.How to Use priorityqueue priority queue in Java
Http://blog.csdn.net/hiphopmattshi/article/details/7334487
3.Java/C ++ bit operations
Bit operations can only be used for integer data
The arithmetic shift is the same as the logical shift in the left shift. All values are filled with 0. The right shift arithmetic shift is based on the symbol bit, and the logic is shifted to the right or directly supplemented with 0.
Tips for common bit operationsHttp://blog.csdn.net/morewindows/article/details/7354571
Judge parity,Exchange two numbers, Exchange symbol, calculate absolute value
4. Find the k-th-largest Value Method
Http://weishi2007.blog.163.com/blog/static/20417950201272343352311/
Http://www.cnblogs.com/zhjp11/archive/2010/02/26/1674227.html
1) first sort and then take
2) maintain a K-sized heap
3) draw on the idea of fast sorting, and partition cyclically until the flag node is K