Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c96fbf9

Browse files
add test for 103
1 parent 5cb8fdc commit c96fbf9

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.fishercoder;
2+
3+
import com.fishercoder.common.classes.TreeNode;
4+
import com.fishercoder.common.utils.CommonUtils;
5+
import com.fishercoder.common.utils.TreeUtils;
6+
import com.fishercoder.solutions._103;
7+
import org.junit.BeforeClass;
8+
import org.junit.Test;
9+
10+
import java.util.Arrays;
11+
12+
public class _103Test {
13+
private static _103.Solution1 solution1;
14+
private static TreeNode root;
15+
16+
@BeforeClass
17+
public static void setup() {
18+
solution1 = new _103.Solution1();
19+
}
20+
21+
@Test
22+
public void test1() {
23+
root = TreeUtils.constructBinaryTree(Arrays.asList(1, 2, 3));
24+
TreeUtils.printBinaryTree(root);
25+
CommonUtils.printListList(solution1.zigzagLevelOrder(root));
26+
}
27+
28+
}

0 commit comments

Comments
 (0)