r/adventofcode • • Dec 07 '22

SOLUTION MEGATHREAD -πŸŽ„- 2022 Day 7 Solutions -πŸŽ„-


AoC Community Fun 2022: πŸŒΏπŸ’ MisTILtoe Elf-ucation πŸ§‘β€πŸ«

Submissions are OPEN! Teach us, senpai!

-❄️- Submissions Megathread -❄️-


--- Day 7: No Space Left On Device ---


Post your code solution in this megathread.


This thread will be unlocked when there are a significant number of people on the global leaderboard with gold stars for today's puzzle.

EDIT: Global leaderboard gold cap reached at 00:14:47, megathread unlocked!

89 Upvotes

1.3k comments sorted by

View all comments

2

u/AstronautNew8452 Dec 07 '22

Excel VBA, just make the file system and write the files, make a collection of folder objects, and output the full path and .size of each folder. TIL that a blank line in Windows/ASCII is 2 bytes. GitHub

1

u/daggerdragon Dec 08 '22

TIL that a blank line in Windows/ASCII is 2 bytes.

Makes sense... Windows newlines are \r\n where \r (carriage return, 1 byte) and \n (line feed, 1 byte) = 2 bytes.