These are my solutions to the foo-bar challenge invitation I got from G o o g l e.
For all problems solved, standard Java 8 was used.
Each level consists of 1 to 3 challenges, each of whom
has it's own package under src of the form
foo.bar.l${level_number}.c${challenge_number}
.
Challenge number might be omitted in case it is the only one in that level.
After cloning/forking, please build the project with Gradle as follows
./gradlew build
Then, to test a particular problem, for example l2.c2
, please type
./gradlew test --tests foo.bar.l2.c2.solution.SolutionTest
In each challenge, Google provides 2-3 out of the 5-10 total
test cases as examples. The rest of them are hidden.
For each challenge lx.cy
- description can be found under
src/main/foo/bar/lx/cy/readme.txt
- solution can be found under
src/main/foo/bar/lx/cy/solution/Solution.java
and - test cases can be found under
src/test/foo/bar/lx/cy/solution/SolutionTest.java
Based on what I have read until know, this is how the whole challenge is structured.
Level | Challenge | Time limit for each challenge | Reward after completion |
---|---|---|---|
1 | 1 | 2 days | - |
2 | 2 | 3 days | Friend referral link1 |
3 | 3 | 4 days | Google Interview2 |
4 | 2 | 15 days | Another friend referral link |
5 | 1 | 22 days | - |
- A referral link allows the person you send it to, to enter foobar.
- You are asked to fill out your personal info, if you wish, then a Google recruiter will contact you soon.
-
Level 1
-
Level 2
-
Level 3
-
Level 4
-
Level 5
- Expanding Nebula(not solved)
Note that the readme files were slightly simplified while solving the corresponding challenge.
After completing all challenges, Google will give you a base64 encoded message. The key to decode it is your foobar username. A script was added that prints this message decoded.
To learn more about Google's foobar challenge, check out some of the links below: