Pregunta de entrevista de Big Oh Notation

interview question asked in coding round from array