Explain use of TreeMap
Better use of string builder