Pregunta de entrevista de 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