Pergunta de entrevista da empresa QLU

Find the second last index of a sorted array without using built in functions.