Pergunta de entrevista da empresa Big Oh Notation

interview question asked in coding round from array