Cognizant Interview Question

he asked me follow-up questions for Java coding which is time complexity..i have executed the code, then they asked me this

Interview Answer

Anonymous

Dec 29, 2025

i answered it by explaining, but that was the wrong answer. Then the interviewer explained to me the correct answer