Liutauras Vilda wrote:
Junilu Lacar wrote:How do you break the tie and pick 'a' as "the most frequently occurring" in this case?
I think that is because 'a' occurs most frequently last if there are other element(s) which occur the same amount of times. But OP needs to clarify indeed, as I don't get from the quote below where that 'h' came from while we were talking about 'a'.
OP wrote:output: "aaa" because the element h is in a higher position than the other characaters.