Skip to content

Commit 837bc97

Browse files
refactor 280
1 parent 37c1a84 commit 837bc97

File tree

1 file changed

+0
-22
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-22
lines changed

src/main/java/com/fishercoder/solutions/_281.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,6 @@
55
import java.util.List;
66
import java.util.Queue;
77

8-
/**
9-
* 281. Zigzag Iterator
10-
*
11-
* Given two 1d vectors, implement an iterator to return their elements alternately.
12-
13-
For example, given two 1d vectors:
14-
15-
v1 = [1, 2]
16-
v2 = [3, 4, 5, 6]
17-
By calling next repeatedly until hasNext returns false, the order of elements returned by next should be: [1, 3, 2, 4, 5, 6].
18-
19-
Follow up: What if you are given k 1d vectors? How well can your code be extended to such cases?
20-
21-
Clarification for the follow up question - Update (2015-09-18):
22-
The "Zigzag" order is not clearly defined and is ambiguous for k > 2 cases.
23-
If "Zigzag" does not look right to you, replace "Zigzag" with "Cyclic". For example, given the following input:
24-
25-
[1,2,3]
26-
[4,5,6,7]
27-
[8,9]
28-
It should return [1,4,8,2,5,9,3,6,7].
29-
*/
308
public class _281 {
319

3210
public static class Solution1 {

0 commit comments

Comments
 (0)