You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* You are given a nested list of integers nestedList. Each element is either an integer or a list whose elements may also be integers or other lists. Implement an iterator to flatten it.
13
+
* You are given a nested list of integers nestedList. Each element is either an integer or a list whose elements may also be integers
14
+
* or other lists. Implement an iterator to flatten it.
14
15
*
15
16
* Implement the NestedIterator class:
16
-
*
17
17
* NestedIterator(List<NestedInteger> nestedList) Initializes the iterator with the nested list nestedList.
18
18
* int next() Returns the next integer in the nested list.
19
19
* boolean hasNext() Returns true if there are still some integers in the nested list and false otherwise.
0 commit comments