Pergunta de entrevista da empresa Infosys

Basic DSA question about loop conditions