Ok,
Imagine for example these numbers:
4,9,3,4,9,2,8,4
What I'd like to see is a simple function (no tons o' bloat worth o' types and functions.. just something small!) that gives me the number that occurs the most, and the 2nd-most, on a any array size, of ints. The two most important numbers, so to say..
The result should in this case be:
best: 4
2nd-best: 9
If you're up to it, return an array in which all variables are sorted on quantity, so that there's also a third place, fourth place, etc. (depending on the availability of such variables ofcoz), but best and 2nd-best will do, for me.
In case of more than one 2nd-best, just pick some. Imagine a sorting routine where multiple candidates share the same rank.
One may use Bmax, but I estimate it could be uni-blitzcode.
One last thing: assume that I really want to use full int values, so you can't temporalily overwrite (parts/bits) of them.
Imagine for example these numbers:
4,9,3,4,9,2,8,4
What I'd like to see is a simple function (no tons o' bloat worth o' types and functions.. just something small!) that gives me the number that occurs the most, and the 2nd-most, on a any array size, of ints. The two most important numbers, so to say..
The result should in this case be:
best: 4
2nd-best: 9
If you're up to it, return an array in which all variables are sorted on quantity, so that there's also a third place, fourth place, etc. (depending on the availability of such variables ofcoz), but best and 2nd-best will do, for me.
In case of more than one 2nd-best, just pick some. Imagine a sorting routine where multiple candidates share the same rank.
One may use Bmax, but I estimate it could be uni-blitzcode.
One last thing: assume that I really want to use full int values, so you can't temporalily overwrite (parts/bits) of them.