I have a list which contains numeric strings. The numeric strings in list may start with any number from 1 to 9 (it doesn’t start with “0”). Now i need to find three top occurrences in the list.
Ex:
1234
2345
2343
4356
6434
2343
2222
4545
6666
6653
top three occurrences in the above list respectively are 2,6,4.
For example if occurence of 5 is equal to 6 then occurences[5] = 6
Second thing you must do is write a function to get count of occurences.
The last thing you must do is find the biggest 3 element in occurences array.