Pergunta de entrevista da empresa PriceLabs

The same question where in when the sign changes while traversing the integer array the index and peak element is stored into the output array