Discussion thread for day 5 of the Advent of Code : https://adventofcode.com/2020/day/5
This AoC challenge had Alteryx written ALL OVER IT.
Cheers!
NJ
https://github.com/AlteryxNJ/AdventOfCode_2020
Very similar to @NicoleJohnson
My solution at Day 5.
My approach is different from other's.
Part 2 was simple, but I didn't know what it meant at first.
Brute force following the logic of each step. So keen to understand the much shorter solution to this that others have posted!
P.S. Just saw @NicoleJohnson and @jdunkerley79 convert to binary, and realised I completely missed this hint in the question🙄
There are 10 kinds of people in the world - those who understand binary and those who don't... 😉
Too easy.
Replace+BintoInt
Dan
Exact same solution as @NicoleJohnson 😉
1st solution I came up with aka "why make it simple when you can make it really complicated" :
Then used my brain and came up with same solution as many people :
My Day 5... Nice puzzle!
I remember doing something very similar to this for the group boarding assignment of an airline (but using the real mapping of the plane as one of the inputs).
Tableau preview of that model, prior to coloring the groups.
Saw the binary in this early, which made it much easier. Now caught up so I can get to Day 6 faster.
Thanks to all of you, I learned a lot.
Here is my day 5 solution.
Extremely jealous of the all the bintoint() solutions.
Noted!
Day 5 the long way...
...aaand then the short way!
And now I've also learnt that BinToInt is a thing!
My solution to day 5
My day 5 parts 1+2 solution:
Part 1:
Part 2:
If ever something were suited to Alteryx.... And I finally got to use the knowledge about Binary numbers that's been shoved at the back of my brain since 6th grade.
Spent aaaaages trying to recreate the wheel when I realised I was rebuilding the bin to int function and getting very very lost.
Interested to see the solutions that people rebuilt manually as I struggled to figure that out, then moved on once the simpler version got the answer!