Pergunta de entrevista da empresa Rare Mile Technologies

Given an array, replace each element with the maximum element in the right sub array, replace the right most element by -1.