C3 AI interview question

Leetcode 341. Flatten Nested List Iterator