Pregunta de entrevista de PharmEasy

simple time complexity question based on while and for loops