sort works no correct to build the huffman tree