It's a smart and concise solution, but it may consume larger memory. Each stack push will copy all the content of NestedInteger, which potentially has very deep nest. Similarly NestedInteger curr = nodes.top() might also be memory costy. The algorithm also has partially duplicated memory layout.
Correct me if I'm wrong.