281. Zigzag Iterator

Problem

Design an iterator that iterates over two vectors in zigzag order (alternating between them).

Given two vectors (or lists) v1 and v2, design an iterator that returns elements in zigzag order: one element from v1, one from v2, one from v1, one from v2, and so on.

If one vector runs out, continue with the remaining elements from the other vector.

Examples
Input: [["ZigzagIterator","next","next","next","next","next","next"],[[[1,2],[3,4,5,6]],[],[],[],[],[],[]]]
Output: [null,1,3,2,4,5,6]
Hints
Related Problems

281. Zigzag Iterator

Design an iterator that iterates over two vectors in zigzag order (alternating between them).