Skip to content

Commit f303584

Browse files
committed
Prepare day 8
1 parent ad133f2 commit f303584

File tree

3 files changed

+21
-13
lines changed

3 files changed

+21
-13
lines changed

src/main/java/com/sbaars/adventofcode/common/Tree.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@
44
import java.util.List;
55

66

7-
87
public class Tree<T> {
9-
public enum TreeReversal {CONTINUE, DOWN, UP}
8+
public enum TreeTraversal {CONTINUE, DOWN, UP}
109
private final Node<T> rootNode;
1110

1211
public Tree(T rootNodeData) {
1312
this.rootNode = new Node<T>(rootNodeData);
1413
}
1514

15+
// public Tree(Function<T, Pair<TreeTraversal, >> func, Stream<T> things) {
16+
//
17+
// }
18+
1619
private class Node<T> {
1720
final T data;
1821
final List<Node> children;

src/main/java/com/sbaars/adventofcode/year22/days/Day7.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
package com.sbaars.adventofcode.year22.days;
22

3-
import com.sbaars.adventofcode.common.Day;
43
import com.sbaars.adventofcode.common.HasRecursion;
54
import com.sbaars.adventofcode.year22.Day2022;
65

76
import java.io.IOException;
8-
import java.util.*;
7+
import java.util.ArrayList;
8+
import java.util.HashMap;
9+
import java.util.List;
10+
import java.util.Map;
911
import java.util.concurrent.atomic.AtomicInteger;
1012

1113
import static com.sbaars.adventofcode.common.ReadsFormattedString.readString;
@@ -17,13 +19,7 @@ public Day7() {
1719
}
1820

1921
public static void main(String[] args) throws IOException {
20-
Day d = new Day7();
21-
// d.downloadIfNotDownloaded();
22-
// d.downloadExample();
23-
d.printParts();
24-
// System.in.read();
25-
// d.submitPart1();
26-
// d.submitPart2();
22+
new Day7().printParts();
2723
}
2824

2925
public record Node(Map<String, Node> children, long size){}

src/main/java/com/sbaars/adventofcode/year22/days/Day8.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
package com.sbaars.adventofcode.year22.days;
22

3+
import com.sbaars.adventofcode.common.Day;
34
import com.sbaars.adventofcode.year22.Day2022;
45

6+
import java.io.IOException;
7+
58
public class Day8 extends Day2022 {
69

710
public Day8() {
811
super(8);
912
}
1013

11-
public static void main(String[] args) {
12-
new Day8().printParts();
14+
public static void main(String[] args) throws IOException {
15+
Day d = new Day1();
16+
d.downloadIfNotDownloaded();
17+
// d.downloadExample();
18+
d.printParts();
19+
System.in.read();
20+
d.submitPart1();
21+
// d.submitPart2();
1322
}
1423

1524
@Override

0 commit comments

Comments
 (0)