Sometimes advertising is fun. I turned off my ad-blocker for certain web pages, and while I usually get boring advertising, once in a while you get a good and interesting looking one.
Here the 3 challenges I had and solved via Node.js (just because I can). No solutions here in this post. Maybe some spoilers.
First one. Simple decoding a number written in binary ASCII and simple processing the decoded array. The lines are 40 bytes each (=320 zeros or ones). You could do this manually.
Second one. Counting how many times characters were used. The signal is 30k in size.
Third one took me longest (as it should). Some hints: The two-dimensional space is 128×128 large. If you print it out, you’ll see the start near the top left corner and the finish area is on the top right (multiple finish points end there).
Looks like a maze, though, so first attempt of a simple dead-end-elimination did not work well. What works is flood-fill. https://www.youtube.com/watch?v=Zwh-QNlsurI has a nice explanation for this.
Out of the 11 finishes, 4 worked. The distances were 1071, 1072, 1073 and 1074 steps. If you look at the displayed maze, you’ll immediately spot the 7 false finishes (and not only as I marked them in red). So make sure you flood-fill starting at the finish.
As for the run time for the last test: it’s only 0.8s on a Ryzen 5 Pro 3400GE. The code itself is 280 lines long with 110 lines being the input signal data.
Complexity is low enough to solve them yourself, even if you did not attend computer science classes. This is a great method to weed out those who claim to be able to program but in reality cannot. And it’s fun so that some people (like me) do this for…fun! I was also curious about the story after the first very simple challenge.
I was a bit disappointed about it ending after only 3 puzzles. Google has 5 challenges (or more, as I could not solve the 5th one), so I expected harder and harder puzzles, but for the purpose of screening potential employees, this is sufficient. Google certainly can set the bar higher as their skill requirements are higher too.
I liked that the implementation language was free to choose. Google’s Foobar is limited to Java or Python only. Java is not my thing and Python I don’t enjoy that much.
All in all, good fun for an idle day! Recommended.