Advent of Code 2023 Day 1 (BaseA Style)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Discussion thread for day 1 of the Advent of Code - https://adventofcode.com/2023/day/1
- Labels:
- Advent of Code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@starkey, adding containers was a nice touch to hide that we secretly worked together!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Great start to AOC - I feel like I cheated a bit, but going to have a look at how other people did it.
Recipe here is a bit of a cheat:
- Take each number (written in text and in numbers) in a text input. screenshot 1
- do a cross-join with the test data so that every data row joins to every number
- then check for the first instance of the number ("one") in the text
- then reverse the test data and the numbers and look for the first instance of the number ("eno" - reversed "one")
- now you have the last and the first instance of numbers in the string
Why this way?
- it avoids the issue of numbers that share letters like "oneight"
- given you only want the first and last - you don't need to worry about every instance
- Finding the first instance is easy in Alteryx, finding the last is a little tougher, so reverse the strings and then it all becomes "find the first"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The second part was indeed confusing, but we got her solved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Second part was indeed confusing but we got it done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Complete! I borrowed @Tokimatsu's RegEx Replace after my RegEx Replace formulas missed the stupid Part 2 trick
The ReverseString idea from others was genius!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
My first every AOC attempt "for real" (did one last week to go over in a UG). Didn't get to it until this afternoon, but **bleep**, that second part was a pain! Tried several things but they were hardcoded and I hated that, so I finally came up with a dynamic way using append. Fun fun!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator