Discussion thread for day 3 of the Advent of Code - https://adventofcode.com/2022/day/3
Was aiming for speed over cleanliness. A bit sloppy
My D3 solution. There is more elegant way to generate the a-zA-Z inputs than what I did here :-)
My soltuion.
I was almost lost in Part 2 by 3 elves.
https://github.com/AkimasaKajitani/AdventOfCode/tree/main/2022
Only the third day of AoC, and already I've gotten to use my favorite dark horse... ❤️ MAKE COLUMNS!! ❤️Finding reasons to use this secretly awesome tool brings me enormous joy.
Thankful for tokenize functionality! I keep hoping there's a better way to compare similarities between strings.
How many others did this one while watching National Lampoon's Christmas Vacation? (because I totally have a life)
Good going so far 😃 Day 3 done along with generating Alphabets in Alteryx!
I think 5am wake ups are not optimal as making too many small mistakes!
Decided to type out a-Z and accidently put z instead of x which was giving me the incorrect result which took an age to locate. On hindsight I don't know why I didn't look at the join outputs to see what didn't join.
@NicoleJ I know that you frequently use Make Column tool, but I have never tried to use it. However, in part 2 of Day 2, certainly I felt that my workflow is verbose. So, in this case, I tried to use Make Column tool like NJ use.
I decided that if I can use it elsewhere, I would definitely use it!!! This is awesome tool! I wonder why this tool is still in the Laboratory category.
I tried to avoid Join-Tools as a little extra challenge for Tool Golf.
For the normal one ... let's not talk about what I was doing after 3h of sleep. It's a mess, but here it is.
After @patrick_digan showed his three-tool approach for 1 ... I had to redo mine just for the fun and brought it down to two tools. All the credit goes to Digan. I won't post the secret, as this honor should belong to him.
Got to use my favourite tool - Tile!!! Optimizing for tool golf will have to wait until this evening.
I had fun with this one
A bit challenging today!
Day 3 complete! Crazy to see some of the low tool solutions here but happy to get this done whilst nursing a hangover!
My take on this
Happy Analyzing
Cheers and have a nice day!
@NicoleJ multi-join is a good call, forgot about it. I think Make Columns tools will come in handy for the challenges now 👍 Though Tile is still my go to.
EDIT: ok, @patrick_digan 's ReplaceChar is more impressive, I am going to use that as string search now 👏
Should have been smarter about my a-z A-Z generation. There's little I love more than tokenizing to rows to set up some joins, though. Fun one today!
Starting to feel a little like AOC is warming up!
Here's the first pass - the dirty solution before refactor.
and the detailed view:
I'm enjoying looking at everyone's solution to see the smarter way to do things
ChartoInt you little beauty!
Finally happy with this being quite neat. Cba with tool golf but I do want my solutions to look nice and clear. This'll do!
Loving CharToInt and ReplaceChar formulae today!! 2 tools for the first part, and 3 for the second! But a lot of formulas in each formula tool
Doesn't need to be pretty to work
I feel like maybe I went too complex when seeing others but I went with iterative macros to go through all the letters. It would take the first letter and check and then remove that letter and do that every letter. So I had to make a macro for each one. I see a lot of people using regex with the tokenize and need to look into that. But It seem like you have to hard code the column numbers and I kind have issue with that when dataset might change and have more next time the elves do this.
Generating the alphabet was fun and learned the chartoint and charfromInt which was fun.
Solved a second time using Python #SnakingMyWayThroughChallenges
I'm giving up on trying to be elegant and clean.
I'm also giving up on that in Alteryx.
Easy so far. It's in the post, though.
Calm before the storm..
Day 3 done ! ✅
A lot of tools for a not so hard challenge !
Pretty happy with the simplicity of my part 1 solution, but part 2 made me take a totally different approach. I had fun with this one!
Part 1 Formula:
couldn't think of a nice way to generate the priority :
I did day 3 and 4 in one go so these solutions aren't the cleanest
My solution: