NeetCode #373LC-341MediumStack
← Back to All Problems

#373 · #341 · Flatten Nested List Iterator(扁平化嵌套列表迭代器)

📌 Problem Statement & Constraints

This is an interactive problem. You are given a nested list of integers, where each element is either an integer or a list. Implement NestedIterator with next() and hasNext(), flattening the structure. Constraints: the total number of integers is at most 10^4; the nesting depth is at most 1000.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!