LeetCode 251. Flatten 2D Vector(摊平二维向量)

原题网址:https://leetcode.com/problems/flatten-2d-vector/

Implement an iterator to flatten a 2d vector.

For example,
Given 2d vector =

[
  [1,2],
  [3],
  [4,5,6]
]

你可能感兴趣的:(迭代器,上下文,保存状态,leetcode)