Discussion thread for day 15 of the Advent of Code - https://adventofcode.com/2023/day/15
Today was a good confidence booster! I started by trying to avoid an iterative macro, but found the logic was more straightforward with a macro than without (at least to me). Now I want to go back and try a non-macro solution!
Part 1:
The bulk of this logic was done in a simple multi-row formula tool with built-in Alteryx functions, which just felt so good. CharToInt() was so useful.
Part 2:
After rereading the instructions approximately 15 times, I finally felt like I understood the problem. It luckily sounded much more complicated than it ended up being in practice.
Workflow:
Macro:
This was a fun one, once I figured out the instructions (which took me longer than I'd like to admit...). The method here is pretty much just brute force, so I won't share any further details as to algorithm. I think the workflow itself is a pretty cool use-case for creating conditional logic in Alteryx (i.e. update if row exists, add row if not)
Workflow:
I probably spent more time rereading the description than actually building my workflow.
It may take a bit long to understand what you are asked to solve in part2, but once you get it, logic would be simpler.
I read part 2 for 20+ times. to find out how to allocate the box.
and today also a non macro day.
recordID | label | action | value | box | type | remark |
10 | aa | = | 5 | 1 | take | first, for value |
7 | aa | = | 4 | 1 | take | last, for recordID |
5 | aa | - | 1 | stop | ||
3 | aa | = | 3 | 1 | stop | |
1 | aa | = | 2 | 1 | stop |
Part 1 is straightforward. But Part 2 question text was too difficult to understand. I continued to search the box number.
Had to spend a good amount of time reading the situation again and again.
although the part 1 was not complicated as excepted
Overall, a good challenge so far and got to know about the ASCII value
Formula use for part 1 - Mod(([Row-1:value] + CharToInt([data]))*17,256)
example if ASCII values
a 97
b 98
c 99
d 100
e 101
f 102
= 61
- 45
1 49
5 53
t 116