other than using maps and set is there any other approach to solve this question?
Top k most frequent number in a string
Yes
You can use a heap of pairs where you keep the most frequent number on the top
other than using maps and set is there any other approach to solve this question?
Yes
You can use a heap of pairs where you keep the most frequent number on the top