Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

My Solution For The First Google FooBar Challenge

Google has a code challenge they throw in front of developers from time to time. It starts when you do a search and the results tip back to reveal the challenge. I got it once before but was messing around and closed it. It showed up a second time and I managed to keep it open.

My first challenge was to produce a concatenated string of prime numbers then pull out a requested snippet. I ended up taking two runs at it. In the first, I made a list with True/False values at each index position of the list to identify primes. The second one, I dropped in the numbers themselves so I could simply join the list to collapse it to produce the string.

Based on the challenge, the prime number string only needed to be 10,004 characters long. So, part of the challenge was to figure out how many primes you need to complete the string. I did this by looping up through