Pergunta de entrevista da empresa Oscar Health

An array question. and the time complexity