Write a function that replaces each integer with the next largest in the array.
replaceNextLargest([5, 7, 3, 2, 8]) ➞ [7, 8, 5, 3, -1] replaceNextLargest([2, 3, 4, 5]) ➞ [3, 4, 5, -1] replaceNextLargest([1, 0, -1, 8, -72]) ➞ [8, 1, 0, -1, -1]