Pergunta de entrevista da empresa PayPal

1. Retrieve an element from an array. Time complexity