Google interview coding expectation

Marvell
ohWiivc

Go to company page Marvell

ohWiivc
Sep 30, 2019 5 Comments

I recently appeared on-site at Google. In the coding rounds, I came up with best solution in terms of space and time. But, while coding it up, I was making few mistakes and missing some cases. So, I had go back, erase it and rewrite it etc. But, finally I came up with right code anyways.

Recruiter told me that I came up with good solution and struggled to implement. So, they are not going further and told me to try again next time.

I am wondering if the Google's expectation is to write bug-free code at first shot itself without erasing etc.? Can any Googlers clarify?

comments

Want to comment? LOG IN or SIGN UP
TOP 5 Comments
  • Google / Eng
    batmobile

    Go to company page Google Eng

    batmobile
    No, you do not need to write bug free code in one shot. Also no, one round of bad performance doesn't reject you. It sounds like you did not make HC. You probably misunderstood the question and/or had the wrong answer. Or you weren't able to go through all the problems (many questions have multiple sections that build up on the previous section).
    Sep 30, 2019 1
    • Marvell
      ohWiivc

      Go to company page Marvell

      ohWiivc
      OP
      Thanks for your reply. Ya, it seems like I did not go through follow ups in the same problem. One of the interviewer asked a follow up problem at the end and asked me if I can tell the solution in high level. I did say the solution verbally. But, since the time was up, the interview ended.
      Sep 30, 2019
  • If you don't write optimal code in one stroke (no eraser) with sufficient number of edge cases covered, it's not good.
    Sep 30, 2019 0
  • Cisco
    Gpanxown

    Go to company page Cisco

    Gpanxown
    No, but you are expected to fix your own bugs by testing code after you're done writing it.
    Sep 30, 2019 0
  • that's entirely due to one single interviewer. You might meet a picky guy. Don't overthink too much. There are many other good places.
    Sep 30, 2019 0