i have given a string. i need to find out maximum occurences of a letter in that string. If two letters have same count, then you choose one which is first in alphabetical order...
example gullapudi l=2,u=2 so you choose l as result...
Try creating a hash where the letter is the key and the value is the number of occurrences, then you can get a char array from the original string. At the end you can get a set from the hash and order it first by number of occurrences and then the alphabetical order.
She will remember your heart when men are fairy tales in books written by rabbits.<br /> As long as there is duct tape... there is also hope.
It's hard to fight evil. The little things, like a nice sandwich, really helps. Right tiny ad?
a bit of art, as a gift, that will fit in a stocking