So here is my problem statement:
Write a program that reads an unspecified number of integers from a file and finds the integer that has the most occurrences. If several numbers have the most occurrences, all of them should be reported.
I would like to solidify the logic before i jump into it.
Im thinking i read the file into an array, sort it, and count each integer (obviously).
Im wondering if it would be possible to use maybe a linkedhashmap to do this, where each integer is added individually and then i increment a counter in the 2nd position (sorry i dont know the terminology... lhm.put("23", new Integer(i + 1))...the 2nd half of that method call)
Or would there be a simpler way of doing this?