adventofcode.year_2021.day_2021_06.readable

Module Contents

Classes

Ocean

An ocean ready to be filled with lantern fish

Functions

part1()

part2()

Attributes

data

adventofcode.year_2021.day_2021_06.readable.data
class adventofcode.year_2021.day_2021_06.readable.Ocean(data)

An ocean ready to be filled with lantern fish

Using a dictionary to count fishes of each age gives us a O(n) implementation for the two parts of the challenge.

time_step(self)
n_fishes(self)
adventofcode.year_2021.day_2021_06.readable.part1()
adventofcode.year_2021.day_2021_06.readable.part2()