This is the first visualisation I see on this sub that actually increases my understanding of the solution, apart from just looking nice. I would benefit a bit more if you clearly showed that the distance from the left side of the screen to the remaining letter is the priority, but great job, I love it.
Thanks! With the time limit of trying to post these before bed, plus the scripting approach I'm using to make them, I'd decided to try to carve out a little niche for myself focusing on a functional/utilitarian style that shows more of the steps of the solution. (Brutalist design still counts as an aesthetic, right?) That said, I really do admire some of the other gorgeous visualizations that others have made here.
Regard the distance and priority. I'd actually thought about putting in a number-line to show how the distance relates to the priority. But I was worried that might be to dense. On reflection though, I might have had the priority label slide in from the left and tick upward as it went.
Rearranging is smart! I just used dictionaries for storing the first two bags and found the overlapping value based on the contents of the third bag. Not very memory efficient but constant (ideally) lookup times were a nice advantage.
6
u/[deleted] Dec 03 '22
This is the first visualisation I see on this sub that actually increases my understanding of the solution, apart from just looking nice. I would benefit a bit more if you clearly showed that the distance from the left side of the screen to the remaining letter is the priority, but great job, I love it.
1
u/lVlagiick Dec 03 '22
Ha! Didn't even think to sort the rucksack's alphabetically to match for overlaps. I just went with a n^3 solution :)
2
u/AlistairJF Dec 03 '22
This gave me the hint I need: sort and then intersect. My solution is still quite clumsy though!
1
u/push-up Dec 03 '22
Wow that is really cool. :D
1
u/Icy_Conversation781 Dec 03 '22
Nice idea.
1
u/optimushz Dec 04 '22
That's exactly the approach I took to finding a common item in the rucksacks. Turn a string into an alphabet and match it with other alphabets.
1
u/opnseason Dec 05 '22
Rearranging is smart! I just used dictionaries for storing the first two bags and found the overlapping value based on the contents of the third bag. Not very memory efficient but constant (ideally) lookup times were a nice advantage.
0
u/[deleted] Dec 03 '22
[deleted] — view deleted comment