DIY: Flatten Nested List Iterator
Solve the interview question "Flatten Nested List Iterator" in this lesson.
We'll cover the following...
Problem statement
You will be given a nested list of integers named nested_list
. Each element will either be an integer or a list whose elements may also be integers or other lists. Your task will be to implement an iterator to flatten the nested list. ...
Access this course and 1400+ top-rated courses and projects.