Skip to content

Latest commit

 

History

History
 
 

flatten_2d_vector

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Problem

Implement an iterator to flatten a 2d vector.

For example,

Given 2d vector =

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

By calling next repeatedly until hasNext returns false, the order of elements returned by next should be: [1,2,3,4,5,6].