Files
advent-of-code/README.md
2022-12-08 01:31:18 +01:00

652 B

Advent of Code 2022 - Assignment7 javascript

Assignment 7 involves parsing linux directory commands/results into a tree. The solution defines a root TreeNode first and sets it as currentdirectory. Whenever a cd command is found a new node is created if it does not exist and set to currentdir. Whenever a cd .. is found currentdirectory is set to parent. Whenever a file is found size is recursively increased for current node and parent nodes.

References