AfterAcademy Tech
Sort Characters By Frequency - Interview Problem
You are given a string S and its length L and you need to sort its characters based on their frequency. The characters in the output will be distinct and ordered based on their frequency in S, higher frequency comes first.