Pergunta de entrevista da empresa Oracle

Find the last occurrence of a target number in a sorted array.