Efficient way to count and find occurrences ( lotto Analysis )

artevb

New Member
There is two things i want to achieve : 1) find out the pair number from lotto result and store to Hash table. 2) loop through the lotto result in a efficient way, count the frequency and add the frequency result to pair number hash table. I want to build a program that able to tell me the pair number frequency. \[code\]For a list / array of number , example : 4, 12, 20 , 32, 48, 50 2, 22, 20 , 32, 38, 40 4, 12, 20 , 25, 33, 44 1, 11, 20 , 31, 48, 50 1, 12, 20 , 36, 47, 51\[/code\]The result I want :\[code\] Pair Number | Repeat Times 4, 12 2 4, 20 2 12, 20 3 . . . .\[/code\]list out all the possible pair number automatics
The data not necessary in list / array .Any another recommendation to store the data for easy grouping ? map ?Any efficient way to group and count the repeat number other than looping ?Appreciate for any suggestion and advice.
 
Top