Making an array with the order of numbers from another array (c#)
I'm looking at writing an array that takes the values of another array and
"sorts" them into another array based on their size.
Example:
an array of [16, 5, 23, 1, 19]
would end up in the second array as
[2, 1, 4, 0, 3]
The first array can be any size, but is assumed to not have any duplicate
numbers in it. It should NOT sort the numbers by greatest to largest,
maintaining position in the array is vital.
Thanks!
No comments:
Post a Comment