Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list -- whose elements may also be integers or other lists. By calling next repeatedly ...
# Time: O(n), n is the number of the integers. # Space: O(h), h is the depth of the nested lists. # This is the interface that allows for creating nested lists. # @return the single integer that this ...