Advent of Code 2020 - BaseA Style (Day 14)
- 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 14 of the Advent of Code : https://adventofcode.com/2020/day/14
- Labels:
- Advent of Code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Feel like I over complicated part 2 but it works...
Lots more binary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here's me, a nice step down from yesterday's part 2 😅
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Has anyone got a good way of doing "find nth" in a formula. I think part 2 could be simplified if there's an easy string manipulation way of doing "find nth" to search through Xs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Balders yep - did some dynamic regex to get a new version working. Less tools but slower than old version.
REGEX_Replace(
iif([Row-1:memory]="",[memory],[Row-1:memory]),
"^(.{" + ToString(Length(
REGEX_Replace(Mask,"(^([^X]*X){" + ToString(i) + "}[^X]*)X.*","$1")
)) + "})."
,"${1}" + Substring(PadLeft(IntToBin([P]),Count,"0"),I,1))
And used Regex CountMatches to work out how many I needed to run
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@jdunkerley79 excellent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Not aiming for any golf points today...
the first part builds the regex for the replacements.
Part II - went iterative as I couldn't figure out how to replace all the potential 'X's.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Day14!
There are a lot of tools, but it's working well.
Workflow:
Outer Iterative Macro: Iterative is only 36 times.
Inner Batch Macro: overwrite the Field Name for splitting 0,1
I have still yesterday's homework...(I don't clear the Day13 Part 2 by only Alteryx)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I struggled through part 2, but eventually got there. I think I can chalk it up to not reading the prompt thoroughly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Parts 1 and 2.
I thought I'd have to use a macro to generate the combinations for part 2, but I was able to figure it out using multiple applications of BinaryAnd in the big formula
Dan
