Design an iterator to flatten a 2D vector. It should support the next and hasNext operations.
next
hasNext
Implement the Vector2D class:
Vector2D
Vector2D(int[][] vec)
vec
next()