1. Pass through the array, building another array that contains the 4 digit numbers, and as a second dimension, the number of times the 4 digit number is found.
Basically, use the 4 digit number to search your second array, if you find the 4 digit number, add 1, if you don't find it, add it as a new entry with a value of '1' in the second dimension.
2. Then pass through the second array, you simply store the 4 digit number that has the highest value.
Bookmarks