[Nottingham] Introduction and Java Question

Jason Liquorish jason at dropshock.com
Sun Oct 19 11:12:29 UTC 2008

On Sun, 19 Oct 2008 11:23:59 +0100
Jason Liquorish <jason at dropshock.com> wrote:

> On Sun, 19 Oct 2008 11:21:42 +0100
> David Aldred <david at familyaldred.org.uk> wrote:
> > ...so you need to count instances of numbers read from the list,
> > then sort by the count.  The mode is the highest in the sort - if
> > there's more than one highest count then you print both/all.
> > 
> Yep that is what I need to do, I have tried a few things including if
> statements and while loops but I just cannot seem to get it working. I
> was creating an array and putting all the numbers into that, then I
> had a second array which I input the count of each number in the first
> array into the corresponding index, this obviously left redundant data
> laying about but I could not get it working correctly anyway =(

I have had a breakthrough and I can now find the most recurring number
in the array, my only problem now is if two or more numbers occur the
same amount of times I am not sure how to print them all out.

My code is here http://dpaste.com/85429/

Jason Liquorish <jason at dropshock.com>

More information about the Nottingham mailing list