Quick question: I have an array double[]array=new double [10] in which there are random doubles, say between 0 and 20.
What i want is get another array int []resultingArray=new int [array.length] that each value int is the index of a value double of the array[] sorted form the biggest number to the smallest.
Since my english sucks here is a "diagram":
array = (2, 6, 3) _____ resultingArray = (1, 2, 0)
It's an exam question. The doubles are GPAs from students and it asks for a method that returns an array composed of the IDs (which in my code are the indexes of double[]array) of the students from the best student to the worst.