Reliable interview question

Nested loops and data structure concepts.