d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Fg For Java To Python Conversion > Savethebetarabbit Foobar
Add Reply New Topic New Poll
Member
Posts: 7,205
Joined: May 11 2009
Gold: 5.00
Nov 8 2017 01:03pm
Was taking the FooBar challenge, and their solution.java stub won't compile. I found this out after I solved the problem with Java on my local.

I'm offering 100fg for Java to Python translation honoring my algorithm. Meanwhile, I'm doing this myself but don't have much prior experience with python.

Java Source (contains problem statement):
https://bitbucket.org/RedFromWinter/foobar/src/102266aa2bb254bda5262e174530f1920297c0ac/FooBar/src/SaveTheBetaRabit.java?at=master&fileviewer=file-view-default

Code
def answer(food, grid):
return 1
Member
Posts: 7,205
Joined: May 11 2009
Gold: 5.00
Nov 8 2017 01:52pm
retract, was pretty easy conversion

Member
Posts: 18,220
Joined: Jul 5 2008
Gold: 215.50
Nov 10 2017 01:49am
1) If you're doing this to try and get a Google interview, it will not matter... I've never heard of anyone getting an interview after this. Better off submitting a resume.
2) There's no reason to write out the problem in multiple languages... prior to any of your interviews you'll be asked what language you want to use.
Member
Posts: 7,205
Joined: May 11 2009
Gold: 5.00
Nov 10 2017 05:24pm
Quote (Remembrance @ Nov 10 2017 01:49am)
1) If you're doing this to try and get a Google interview, it will not matter... I've never heard of anyone getting an interview after this. Better off submitting a resume.
2) There's no reason to write out the problem in multiple languages... prior to any of your interviews you'll be asked what language you want to use.


#1
I'm just doing these for fun/practice. I've heard of people being contacted by a recruiter after reaching level 4.

#2
Their Java stub would not compile (as original post said), therefore I converted it to python so I could submit in the time window.

Here is the final solution I submitted if anyone is curious:
https://bitbucket.org/RedFromWinter/foobar/src/6fc8f85214948894af027344a6c497f76c4f8bae/FooBar/src/SaveTheBetaRabit.java?at=master&fileviewer=file-view-default

This post was edited by RedFromWinter on Nov 10 2017 05:40pm
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll