Hi,
I am looking for a way to sort numbers enterred by a user, prefferably in order smallest to largest or vice verser - but at very least to find the smallest & largest numbers of the ones enterred.
There are approximately going to be 15 numbers or so.
So for example:
Enterred A = 56
Enterred B = 7
…
…
Enterred H = 72
then it should display:
Enterred B = 7
…
…
Enterred A = 56
…
…
Enterred H = 72
when sorted or the other way round (largest to smallest).
this could be done with comparrisons but for 15 numbers it would be A LOT of comparisons.
Does anybody know an algorithm or a way of doing this more simply ?
Array.sort may do it but not sure if it works for numbers?
Any help is much appreciated!