changed prefix tree building algo count to iterate length - 1 times, which is guaranteed by nature of algorithm

Huffman's prefix tree algo using two queues always decreases total
element sum in both queues by one, and terminates when total elemnts
equals one, hence it will always run length - 1 times, where length is
length of array of non-zero freq characters