This repo contains the coding problems I encountered in the so-called Google Foobar challenge, and my (!) solutions. Grateful to Stack Overflow, YouTube and other web resources that I've used to either understand the ideas or get some coding ideas (and some code chunks- unintentional mostly). However, I do have to say that- I really enjoyed thinking about these problems and brainstorming some solution, plus to see what other people have come up with! Plus, I learned a bunch of new things and gained some interest in studying Graph Theory and Topology while taking enough time to chill between problems (may be a little too much ;-) )- so it's a win-win!
Level 1. One problem at this level. Pretty easy!
Level 2. Two problems at this level. Needs knowledge of basic search algorithms/graph theory. Still easy enough.
Level 3. Three problems at this level. Similar to Level 2, but needs some dynamic programming approaches too. Bit of a mixed bag.
- Problem_3.1: Find the Access Codes
- Problem_3.2: The Grandest Staircase of Them All
- Problem_3.3: Prepare the Bunnies' Escape
Level 4. Two problems at this level. The fun begins here (!)- but honestly these problems are much more intriguing and thought provoking. Needs knowledge of applied math- specially geometric transformations and combinatorics.
Level 5. One problem at this level. This one was wild- needs knowledge of pure math!
Python.
- Your code will run inside a Python 2.7.13 sandbox. All tests will be run by calling the
solution()
function. - Standard libraries are supported except for
_bz2
,crypt
,fcntl
,mmap
,pwd
,pyexpat
,select
,signal
,termios
,thread
,time
,unicodedata
,zipimport
,zlib_
. - Input/output operations are not allowed.
- Your solution must be under 32000 characters in length including new lines and and other non-printing characters.
Java.
- Your code will be compiled using standard Java 8. All tests will be run by calling the
solution()
method inside theSolution
class - Execution time is limited.
- Wildcard imports and some specific classes are restricted (e.g.
java.lang.ClassLoader
). You will receive an error when you verify your solution if you have used a blacklisted class. - Third-party libraries, input/output operations, spawning threads or processes and changes to the execution environment are not allowed.
- Your solution must be under 32000 characters in length including new lines and and other non-printing characters.
Some random commands on foobar terminal...