Live data from Hacker News

How to Ace the Google Interview: Ultimate Guide

byte-by-byte.com

111–120 of 239 posts

Re: How to Ace the Google Interview: Ultimate Guide

#111

Earlier quoted context omitted.

Which elite schools? I went to MIT and didn’t have to do any of this.

https://courses.csail.mit.edu/iap/interview/materials.php

That's a student taught class. Not really policy-defining.

Re: How to Ace the Google Interview: Ultimate Guide

#112

Earlier quoted context omitted.

I’ve heard that Google allows you to type code into a computer now during an interview. A welcome improvement in the state of the art. Still no access to a compiler or debugger, but baby steps.

I had to write code exclusively on white board last month. Only laptop in the room was interviewers which he was using it exclusively to furiously copy the code i was writing in the whiteboard. He said it will compile it and submit report when he gets back to his desk. :/

> He said it will compile it and submit report when he gets back to his desk. :/

So, he's asking you to do something he can't do? Why can't he just read your code and know how it will behave?

Re: How to Ace the Google Interview: Ultimate Guide

#113
post #92

Earlier quoted context omitted.

> You can bypass the whole charade by knowing 2-3 people within Google that can provide "assurance" you are good enough. This is not a thing. Everyone goes through the same level-adjusted loop. > Another way is to be a significant contributor to some popular open source project. LOL no. Google is literally famous for rejecting major open source contributors for not knowing how to reverse a binary tree.

Is there something special about reversing a binary tree? AFAIK, you could swap the child pointers and do that recursively for the child nodes. You could also do things O(1) by just changing the comparison function, perhaps by wrapping it to negate the comparison.

This is a specific, well-known case. Max Howell (the author of Brew) was rejected by Google. One of his interviewers asked him to invert a binary tree.

https://twitter.com/mxcl/status/608682016205344768?lang=en

Re: How to Ace the Google Interview: Ultimate Guide

#114
post #87

Earlier quoted context omitted.

I thought you were allowed to assume functions you needed in the interest of a modular solution. Array.flatten is an obvious “assume I have this, I would write it anyways.” I think most decent interviews will give you a pass on an enhanced standard library.

When doing an interview at Google in C, I asked if I could assume I had a hashtable implementation with so-and-so interface, and the interviewer said no ¯\_(ツ)_/¯

Ouch. Well, most hashtables in C are custom, I guess.

Re: How to Ace the Google Interview: Ultimate Guide

#115

Earlier quoted context omitted.

Which elite schools? I went to MIT and didn’t have to do any of this.

https://courses.csail.mit.edu/iap/interview/materials.php

The course you linked to doesn’t cover any of the algorithms mentioned in the grandparent. It does however cover about three dozen common interview questions. The course is also from 2009.

Re: How to Ace the Google Interview: Ultimate Guide

#116
post #102

Earlier quoted context omitted.

I had to write code exclusively on white board last month. Only laptop in the room was interviewers which he was using it exclusively to furiously copy the code i was writing in the whiteboard. He said it will compile it and submit report when he gets back to his desk. :/

Sounds like a great opportunity to whiteboard an exploit instead.

I'm a moron and did something stupid not too long ago that would be perfect for this.

I'm too lazy to find my actual code but here's the gist:

C# but might working in Java/etc too *

Create an Image of some size

loop hight of image

   loop width of image

      Bitmap b = cast Image to bitmap since Image doesn't have the pixel method

      get pixel value or whatever looks legit 

   end
end

This creates a new bitmap for EVERY pixel in the image. If the image is large enough and the system is 64 bit bad things happen. On Lubuntu this code burned through 8 GB of ram in seconds and was well on its way to eating all the virtual memory before I forcefully shut it off.

Maybe this is a Linux issue but it hard locked my system. I couldn't switch to a different terminal or anything.

Re: How to Ace the Google Interview: Ultimate Guide

#117

Strange, I have yet to meet a single Google interviewer who was looking for perfect syntax during the interview. Last year I forgot the syntax for a data structure, told my interviewer "something like this," and he just said "that's fine." Got the internship later on. I even had one interviewer who was ok with me writing out matrix algebra mathematically instead of using np.matmul and all that.

As an interviewer, I can confirm that I don't care about syntax or whether the program compiles if I'm convinced their solution and approach would work. I'm also OK with candidates using placeholder helper functions or shorthand for trivial things (e.g. null/undefined check in JS) if they explain to me verbally what that part is supposed to do.

I also interview software engineering candidates at Google (n=150) and while I mostly agree, I do think there's some signal in whether a candidate can get the syntax right. It's not a dealbreaker if they don't, but all things considered someone who comfortably writes code all day is more likely to be able to write syntactically correct code than someone who doesn't.

The main things I want to see, though, are: can you communicate well about the parts of the problem that aren't clear to you? Can you analyze and compare solutions? Can you figure out something reasonably efficient? Do you understand your solution well enough to code it?

(Speaking for myself, not my employer.)

Re: How to Ace the Google Interview: Ultimate Guide

#118
post #44

Earlier quoted context omitted.

Elite schools do that in undergrad; e.g. as an initial scored lab exercise, write this recursive fractal shape using Logo, parallel Delaunay triangulation with prefix sums , dynamic programming solving oligopoly problem or single-value Paxos pseudocode on a piece of paper in 10 minutes (I am being serious). If you can cope with it, it immediately shows up in the interview and you are considered a member of the club,…

I’m having a hard time believing this is true.... If nothing else, Logo? In 2019?

Hackernews has its own instagram reality to it.

Re: How to Ace the Google Interview: Ultimate Guide

#120
post #38

Earlier quoted context omitted.

Maybe the sort of person who has the time/desire/interest to study a guide to figure out how to fit in at google is exactly the sort of person they want to hire.

The bikeshedding engineer is exactly what Google or Amazon is looking for. Nothing wrong with that either, I just take issue with the entire industry standardizing around that type of engineer.

My impression was the opposite.

You're given a problem, there are usually a few clear-cut ways to solve it. You're expected to find an optimal or near optimal solution fairly quickly, and explain your approach clearly. That's it.

I've thought the more open-ended, unstructured interviews lead to more bikeshedding opportunities.

Post reply on HN