https://ide.codingblocks.com/s/344259 this is a program to arrange characters as per frequency. my code is giving output of string in increasing order like a then b then c,
but i want if i print string like nomatter then frequency of n should display first then o and so on what changes should i made in my code .pls help me .make changes in my code if possible.
Arrange character in a string
hello @shrutikatyal
u can take help of visited array.
first store frequency of all the character .
then start iterating ur string from start .
if current character is not visited then mark it visited and print its frequency.
if visited then move to next
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.