I got a late start on this and Ruby is my go-to language for get'er done.
I'm thinking I could have used a single functions w/ some recursion but this completed the challenge and it isnt overly complex. To do this recursively I'd have to take into account the number of iterations and the challenge only went to 3, so meh.
Still catching up, still Ruby. Made a class for this one, I like it...
Recursion! This one was my favorite so far and stumped me for a bit. In my recursion I accidently did an extra assignment that threw off just a couple of the results. But I am very happy with the length of this solution.
So, I'll probably just stick with keeping this whole challenge in Ruby. This day's challenge got another Class thrown at it. I had fun setting up the validation logic on it. Overkill for the challenge? Maybe, but it seems to be able to scale and be extensible.
Its just binary conversions, this was a quick one. Ruby slice_when
comes to the rescue again for partitioning arrays.
Lots of text splitting / array manipulation, makes for ugly code. However, its pretty short and gets the job done quickly.
Hit a few snags overthinking the recursiveness, reworked and simplified the function quite a few times and then cheated a little and realized I needed to subtract 1 to get rid of the 'shiny bag' count ...sigh.
Another fun one, there might have been a shorter way to solve this but I chose the route of making a copy and changing the command index and running the commands for each iteration until I got a success. Works but I havent benchmarked it so it will probably hit the brakes on massive datasets.