I was invited to this challenge by searching "golang tail recursion" on Google.
A tip I see online is that don't rush into the challenge until you feel like you're as good as a Google developer, and I agree to this because of its hard deadlines.
Anyway, because the discussion on the internet has gained hundreds to thousands of views, with this many candidates, I suspect the challenge could simply be a marketing game at the end. I believe the probability of getting an interview by solving Google Foobar is almost as low as applying for a job online. So I'll just solve it with a mindset of practicing algorithmic problems just the same as playing with Advent of code.
Here are my solutions.