Module advent_of_code_2022::day_7
source · Expand description
This is my solution for Advent of Code - Day 7 - No Space Left On Device
Parse and recursively walk a directory structure to find the optimal directory to delete
Structs
- Represent a directory in a file system
- File 🔒Represent a file in a filesystem
- Represent a file system with it’s contents in a tree starting at
root
and the current working directory inpath
Enums
- Command 🔒Represent console output as a command to update the state of a
FileSystem
to match
Functions
- Part 2: Find the smallest directory that needs to be deleted to leave 30M units of space free from a total of 70M units of space.
- Part 1: Sum all the directories whose total contents are 100_000 units or less
- Turn console lines into structured data representing the change to the file system state indicated by that line of output.
- The entry point for running the solutions with the ‘real’ puzzle input.