Does Google expect "perfect" code?

Sep 8, 2018 11 Comments

I just interviewed at an onsite, and 3 out of 4 interviews I ended up solving 2/3 questions and was on the right track for the final follow up of each question (but didn't have enough time to completely code it out). The last interview the interviewer was silent until the end where he said "yup thats the correct implementation" and then didn't ask any follow up questions...

In your previous experiences, did Google expect perfect code in each of the interviews?

comments

Want to comment? LOG IN or SIGN UP
TOP 11 Comments
  • I had perfect implementations for all my questions and still got rejected. It depends on the interviewer and the difficulty of the question. Worst thing about it is I got stuck for a few minutes in the interviews I failed and they gave me a hint which made me fail, no hint next time please!
    Sep 8, 2018 4
    • Google
      T4r6y7

      Go to company page Google

      T4r6y7
      To be fair, *most* interviewers ask the same question many times, so they know many answers people give, and your way might not be correct / optimal / enough to pass the interview. So they could be doing you a favour.

      Of course there are also people who are just bad at interviewing and interrupt you for no good reason...
      Sep 8, 2018
    • Yes that's true as well. I've had cases though where I had an English explanation for a problem solution then was told to put it in mathematical terms for the next 25 minutes working through that b/c interviewer would constantly add confusion until no time was left ( not while interviewing at Google)
      Sep 8, 2018
  • Google
    𓁻⅃𓁻

    Go to company page Google

    𓁻⅃𓁻
    I can tell you from experience that it's not expected in production πŸ˜‚
    Sep 8, 2018 0
  • PwC
    dUPY02

    Go to company page PwC

    dUPY02
    I think it depends on the difficulty of question in many cases. If its a hard question for which takes a lot of time to get the correct idea and it also has an implementation that is lengthy then interviewers are more lenient about complete implementation if they feel you have got the optimal solution idea. If however the question is easy/medium then they do expect you to write complete code without bugs
    Sep 8, 2018 2
    • Intel
      leaveit

      Go to company page Intel

      leaveit
      Everything is on whiteboard ... how can they verify the code? Do you mean all the corner cases should be handled?
      Sep 8, 2018
    • PwC
      dUPY02

      Go to company page PwC

      dUPY02
      Yes corner cases and any other bugs that might get introduced when implementing. Which might not have been discussed when you shared the algorithm with them.
      Sep 8, 2018
  • In today’s market yes
    Sep 8, 2018 0
  • Nope. Some do say at the beginning you can make some assumptions or use helper methods without implementing them if you explain what they do.
    Sep 8, 2018 0