use an array that increments its element depending on the value of the reference array/arraylist as you iterate over it
the index of the counting array would depend on which value the current reference array has
zeroliken
Nearly a Posting Virtuoso
1,346 posts since Nov 2011
Reputation Points: 214
Solved Threads: 206
Skill Endorsements: 15