Pregunta de entrevista de Purple Tutor

working of inner loop and outer loop