diff options
author | Martin Ashby <martin@ashbysoft.com> | 2022-12-07 21:30:24 +0000 |
---|---|---|
committer | Martin Ashby <martin@ashbysoft.com> | 2022-12-07 22:00:15 +0000 |
commit | 7383b348a746ac340e3058d733edc59a7c893e32 (patch) | |
tree | d80b93952ab8efedd12f61c8763ece4d0a120559 /input/day11.txt | |
parent | 745b6bfd5730a926a32c34d0b6e50a5685cbcddc (diff) | |
download | aoc2022-7383b348a746ac340e3058d733edc59a7c893e32.tar.gz aoc2022-7383b348a746ac340e3058d733edc59a7c893e32.tar.bz2 aoc2022-7383b348a746ac340e3058d733edc59a7c893e32.tar.xz aoc2022-7383b348a746ac340e3058d733edc59a7c893e32.zip |
day7
This one was a little trickier, as the obvious solution for navigating back up a tree is to keep a reference to the parent.
However that's essentially a doubly linked list which is a pain in the ass in Rust.
Instead, use a separate variable for the current 'key' into the tree
I'm not especially happy with the terminal processing as well, since after the 'ls' command we need to 'peek' at the next entry to see if the 'ls' has finished and we're onto a next command
I couldn't think of a very good way to do this except loops and loops.
Diffstat (limited to 'input/day11.txt')
0 files changed, 0 insertions, 0 deletions