I have got a weird situation. There is an array that has got numbers from 1 – 20, the other array has got all the random numbers. Using Array.Sort(rand) I’m able to sort the randnos array. But how can I give a rank to those numbers using the numbers array.
Should I use the sorting algorithms? Or are there any available stuff?
Given an array of random numbers:
Here is a method to sort them and provide their rank, as a string
number-rank:Prints (for example):
Note that you could also have done: