Domanda di colloquio di PharmEasy

simple time complexity question based on while and for loops