h*****g 发帖数: 312 | | R***i 发帖数: 78 | 2 TreeMap> map;
iterate each word in book from front to back
if word found in map, append current page number to ArrayList
if word not found in map, put to map, append current page number
TreeMap automatically sort on key, which is String type word
iterate map to generate "word -> page number" pairs |
|