Discussion thread for day 14 of the Advent of Code : https://adventofcode.com/2020/day/14
Feel like I over complicated part 2 but it works...
Lots more binary
Here's me, a nice step down from yesterday's part 2 😅
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.
@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
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.
https://github.com/dsmdavid/AdventCode2020
Day14!
There are a lot of tools, but it's working well.
I have still yesterday's homework...(I don't clear the Day13 Part 2 by only Alteryx)
I struggled through part 2, but eventually got there. I think I can chalk it up to not reading the prompt thoroughly.
Parts 1 and 2.
Dan
Here is my part one, so many tools so keen to look at @danilang's part one with much fewer tools.
Struggling to find the time to keep up to date on AoC but will continue to push for the second stars.
Easy one today - although a lot of busy work. Didn't try for tool golf at all, runs in <1s so didn't seem worth working on any more.
And that time nominated for the "most overcomplicated solution" ...