281. Zigzag Iterator
Input:
v1 = [1,2]
v2 = [3,4,5,6]
Output: [1,3,2,4,5,6]
Explanation: By calling next repeatedly until hasNext returns false, the order of elements returned by next
should be: [1,3,2,4,5,6].Input:
[1,2,3]
[4,5,6,7]
[8,9]
Output: [1,4,8,2,5,9,3,6,7].Previous346. Moving Average from Data StreamNext381. Insert Delete GetRandom O(1) - Duplicates allowed
Last updated
Was this helpful?