Leetcode 341. Flatten Nested List Iterator - I was asked this Question at my Google Interview Today!

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

I dont think this is a good solution. The point of iterator is to generate data on the fly, flattening arr won't be the right solution. An iterator should never copy the input data structure.

ameynaik
visit shbcf.ru