Answer :

You just get the tallest mountain first, then you find the second tallest mountain, then you find the third tallest mountain, etc, until you have all the mountains from greatest to least, good luck man