diff options
author | bd <bdunahu@operationnull.com> | 2024-06-10 18:13:57 -0600 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2024-06-10 18:16:52 -0600 |
commit | 116aa074b190599e38a43bd6a8602a05cebdfb5d (patch) | |
tree | 179b2f48c84b243d0ad84dbe23ef7d813349d79b /calorie-counting/README.org | |
parent | 9e149cb6e6f1bf002fb1abc2b79c77afc3d1d36c (diff) |
AoC 2022.1 p1+2
Diffstat (limited to 'calorie-counting/README.org')
-rw-r--r-- | calorie-counting/README.org | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/calorie-counting/README.org b/calorie-counting/README.org new file mode 100644 index 0000000..6d3672f --- /dev/null +++ b/calorie-counting/README.org @@ -0,0 +1,46 @@ +See: https://adventofcode.com/2022/day/1 +** Part 1 +*** Purpose +Given a list of numbers: + +#+begin_example +1000 +2000 +3000 + +4000 + +5000 +6000 + +7000 +8000 +9000 + +10000 +#+end_example + +Calculate the "group" with the largest sum, and report that sum. + +*** Method + +This sounds easy. Split the input into a list of lists: + +#+begin_example +'((1000 + 2000 + 3000) + (4000 + 5000 + 6000) + (7000 + 8000 + 9000) + (10000)) +#+end_example + +Sum up each sub-list, sort it, and take the CAR! + +** Part 2 +*** Purpose +The next part simply asks us to sum the top 3 numbers. So quick and easy, I've just provided the mechanisms for summing X highest numbers. |