i have a hashmap in which i have a word as key and its weight as value .i wan to sort the hashmap with respect to the weights and put it in a file.is there any function i can use to do sorting or i'll have to use any sorting algorithm which i dont want to use
