1. add feature: randomly initialize the map; 2. fix a bug in heap sort 3. rename some global variables