day23: correct naming
This commit is contained in:
parent
d82dcaa421
commit
3a396c8c47
6
day23.py
6
day23.py
@ -11,7 +11,7 @@ class Cup:
|
|||||||
self.right = right
|
self.right = right
|
||||||
|
|
||||||
|
|
||||||
def buildDoubleLinkedListDict(cup_list):
|
def buildLinkedListDict(cup_list):
|
||||||
cups = {}
|
cups = {}
|
||||||
left_cup = None
|
left_cup = None
|
||||||
first_cup = None
|
first_cup = None
|
||||||
@ -47,7 +47,7 @@ def play(cups, current_cup, max_label):
|
|||||||
|
|
||||||
def part1(test_mode=False):
|
def part1(test_mode=False):
|
||||||
my_input = aoclib.getInputAs2DArray(day=DAY, return_type=int, test=test_mode)
|
my_input = aoclib.getInputAs2DArray(day=DAY, return_type=int, test=test_mode)
|
||||||
cups, current_cup = buildDoubleLinkedListDict(my_input[0])
|
cups, current_cup = buildLinkedListDict(my_input[0])
|
||||||
|
|
||||||
for _ in range(100):
|
for _ in range(100):
|
||||||
cups, current_cup = play(cups, current_cup, 9)
|
cups, current_cup = play(cups, current_cup, 9)
|
||||||
@ -63,7 +63,7 @@ def part1(test_mode=False):
|
|||||||
|
|
||||||
def part2(test_mode=False):
|
def part2(test_mode=False):
|
||||||
my_input = aoclib.getInputAs2DArray(day=DAY, return_type=int, test=test_mode)
|
my_input = aoclib.getInputAs2DArray(day=DAY, return_type=int, test=test_mode)
|
||||||
cups, current_cup = buildDoubleLinkedListDict(my_input[0] + list(range(max(my_input[0]) + 1, 1000001)))
|
cups, current_cup = buildLinkedListDict(my_input[0] + list(range(max(my_input[0]) + 1, 1000001)))
|
||||||
|
|
||||||
for _ in range(10000000):
|
for _ in range(10000000):
|
||||||
cups, current_cup = play(cups, current_cup, 1000000)
|
cups, current_cup = play(cups, current_cup, 1000000)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user