day15 package

Subpackages

Submodules

day15.day15 module

Day15 solution.

day15.day15.get_input(path: str) list[str][source]

Get input into list of instructions to parse.

day15.day15.get_string_hash(string: str) int[source]

Returns a string’s hash.

day15.day15.main() None[source]

Read input and call question1/question2.

day15.day15.parse_step_pt2(raw_step: str) Step[source]

Handles as step in part 2.

day15.day15.process_steps_pt2(steps: list[Step]) int[source]

Process a list of steps.

day15.day15.question1(raw_steps: list[str]) int[source]

Returns the sum of hashes for every step.

day15.day15.question2(raw_steps: list[str]) int[source]

Process each step into “lens” boxes and return the total lens power.

Module contents

Day15 solution.