Live data from Hacker News

How to Crack the Toughest Coding Interviews

gklst.tumblr.com

31–40 of 144 posts

Re: How to Crack the Toughest Coding Interviews

#31
post #14
post #2

Google does not have just one hiring committee, and anyone can be on hiring committees if they want to and one of the committees has a need of new members (IE it's not invite only). So this is like saying "ex-Python-dev mailing list member".

Actually, it was invite-only when I was there. But that's sort of besides the point. It's irrelevant whether or not it's an "honor" to be on the hiring committee. The point is that being on the hiring committee does give you some insight as to why people tend to get rejected. Without being on the hiring committee, you really only see why you're rejecting people -- smaller sample size, biased, less diversity of questi…

I was in Seattle / Kirkland, and it was invite only there. I showed up every week (as did the vast majority of the Kirkland HC).

But, yes, I could have been more extensive in my credentials. Unfortunately, "How to Crack the Toughest Coding Interviews by ex-Google engineer, ex-Google hiring committee member who showed up every week, ex-Apple dev, ex-Microsoft dev, author of Cracking the Coding Interview, and author of The Google Resume" was a bit too long :).

Re: How to Crack the Toughest Coding Interviews

#32

> Given a cube with sides length n, write code to print all possible paths from the center to the surface. What is a path through a cube? This seems like some weird combination of graph theory and geometry.

Perhaps they're assuming that the cube is a set of integral points and they want you to count lattice paths. This is trivial in 2-space (e.g., give me the number of paths that go from (0,0) to (5,5) by going only up or right one point with each move (that is, each move is either (0,1) or (1,0))). However, I vaguely recall counting lattice paths in 3-space being a wickedly hard problem with no known polynomial time solution. Could be completely wrong on that, though, and don't feel like looking it up just now.

You could of course write a program that would solve it (trivially), but it might take exponential time :)

Of course, the phrasing doesn't say they have to be lattice paths, so perhaps we can say a countably infinite number of paths of we're only considering integral (or rational) points and have no direction invariant. Uncountably many if we're allowing the reals. Still uncountably many if we allow the reals and have a directional invariant. We reach the realm of a finite solution if it's a finite set of points and we have a directional invariant or another constraint (e.g., the path might be prohibited from visiting any given point more than once). Most of these are still completely intractable as far as I know :)

Re: How to Crack the Toughest Coding Interviews

#33
post #18

I got that book. While the questions and answers are useful, in my experience this book alone is nowhere near enough to get prepared for a Google interview (not that the author claims that). I studied CLRS's Introduction to Algorithms and a couple of other books for about 2 months. Even then I could not answer the hardest questions during the onsite interview. And if you cannot come up with an optimal algorithm for a…

>And if you cannot come up with an optimal algorithm for a given problem, all of the items mentioned in the article (communication, clear coding, testing) don't really matter.

That's just not true and if any company is only interested in whether or not I can generate a correct answer under pressure in 20 minutes, then I'm not interested in working for you.

Re: How to Crack the Toughest Coding Interviews

#34
post #9

Earlier quoted context omitted.

In order: Do you use git? How do you do ticketing? What's it like working here? In my experience engineers at big companies will not give you an answer to those, but canned marketing responses. I don't know why.

You have to be more sneaky. Rather than asking something as generic as >What's it like working here? ask them >What do you like the most about working here? If they give you something like "the stability" or "the high pay" those are generally bad signs. Better signs would for example be "the great people I get to work with every day" or "the autonomy to get to choose what I work on".

My favorite way of phrasing this question is "how does working here compare to other tech companies you've worked at?".

Re: How to Crack the Toughest Coding Interviews

#35
post #5

Interviews work both ways - what questions do you ask them? One I used to ask was do you have IS9002/BS5750, but that was 15 years ago and there are better questions to ask. A good question is also sometimes better than a good answear as it shows you understand things from another perspective and have the ability to ask questions instead of blindly accepting what you are told all the time if your unsure. So what are…

I ask, "what's the best thing and the worst thing about your job?"

Someone asked me that once, and I thought it was a great question, so I stole it.

Re: How to Crack the Toughest Coding Interviews

#36
post #5

Interviews work both ways - what questions do you ask them? One I used to ask was do you have IS9002/BS5750, but that was 15 years ago and there are better questions to ask. A good question is also sometimes better than a good answear as it shows you understand things from another perspective and have the ability to ask questions instead of blindly accepting what you are told all the time if your unsure. So what are…

Here's a list of 100 questions applicants should consider asking a subset of during the interview: http://www.basilv.com/psd/blog/2009/100-interview-questions-...

Re: How to Crack the Toughest Coding Interviews

#37
I think I've been a victim of ageism here in the SF bay area. One member of a group met me in person, and we had a positive experience during the coding interview. (I look young for my age.) I gave him some Python code that solved his problem, as well as a version optimized for common prefixes and another that gave the same tally by user as well as the total aggregate. Note I am not primarily a Python coder, and it's not what I would've been hired for, but it's a good language for quick coding and it looks like its own pseudocode.

The next two members of his group never met me, so all they know about me is the sound of my voice and facts on my resume, and during the phone interview they came across like they thought I was some dimwitted old duffer and that I was Googling the answer because I was doing stuff on my own command line. The guy in charge told me to stop coding, because as he said, "You will take too long and never get done," [1] even though I've been coding in dynamic environments for 15 years, and so my problem solving techniques are all oriented around very rapid iteration. So he effectively disarms me, then proceeds to be the annoying kind of smarmy pair programmer and tell me everything I'm doing wrong as I'm coding. (All of which I could catch if you just let me at it.)

Just a few minutes after the interview, I send him running code, then correct code that solves his problem. (So he's wrong! - [1]) He was probably some fresh-faced kid out of school who doesn't understand other than a C/Java workflow.

The lesson I've learned over the years, is that an organization that interviews you incompetently is one that you don't want to work for anyways.

EDIT: Another thing that really irks me about this interview, was that they sprung a relational data modeling problem on me. That has almost nothing to do with what I'd be hired for, and most importantly they left out the key premise: They're looking for a generalist who can just hop in and do whatever. (Which I can do, as well as being methodical and researching the problem first.) So basically, they're looking for some fresh-faced kid like them who's fearless because they don't have the experience to know that your first model is going to suck. If they had let me know this premise: "we just want to see how you handle just getting something done" versus "we're going to grade the quality of your ER modeling" then I would have done that part totally differently.

Exactly the kind of group I don't want to work for.

Re: How to Crack the Toughest Coding Interviews

#38
post #8

I shared my experience in a blogpost: http://swizec.com/blog/inside-a-google-onsite-interview/swiz... A few days ago I finally realized why they said I'm not good enough at big-O to play with them (despite saying my coding was excellent). For some reason I had a mental block that day and wanted to implement hash tables as prefix trees every single fucking time . I have no idea why. Of course I know a hash table is O(…

Just my two cents, Well hash tables might be O(1), but depending on the circumstance they are used in, how they handle collisions, implementation details and the quality of the hashing algorithm they can see real world performance that is not O(1). Inserting into a hash table can cause the hash table to expand, if the hash table is too small you will get collisions, etc. etc. Some choices of hash functions are actual O(n) instead of O(1). Sometimes hash tables are not appropriate due to the memory requirements. You get the idea.

I actually like people to point these things out, even if the amortized cost is constant in lots of real world usage. When talking about time complexity I appreciate attention to detail, rather then just hand waving and saying its constant. My answer is always, 'well it depends'.

Be careful though, back up your answers in a way that shows you do know what you are doing. Otherwise you can come off as blowing smoke.

Truly understanding writing performance critical code is a black art, and you need to understand more then just the big O of some common algorithms. Showing that you know that performance and complexity are hard and you know there are hidden costs that can bite you and tradeoffs you have to take into account shows maturity.

Re: How to Crack the Toughest Coding Interviews

#39
post #31
post #14

Earlier quoted context omitted.

Actually, it was invite-only when I was there. But that's sort of besides the point. It's irrelevant whether or not it's an "honor" to be on the hiring committee. The point is that being on the hiring committee does give you some insight as to why people tend to get rejected. Without being on the hiring committee, you really only see why you're rejecting people -- smaller sample size, biased, less diversity of questi…

I was in Seattle / Kirkland, and it was invite only there. I showed up every week (as did the vast majority of the Kirkland HC). But, yes, I could have been more extensive in my credentials. Unfortunately, "How to Crack the Toughest Coding Interviews by ex-Google engineer, ex-Google hiring committee member who showed up every week, ex-Apple dev, ex-Microsoft dev, author of Cracking the Coding Interview, and author of…

Fair :) I'm just used to MTV HC's, where you may have 75 HC members, and 10 active ones.

I expect the "newer" offices (relatively, of course) may not have this issue.

Re: How to Crack the Toughest Coding Interviews

#40
post #9

Earlier quoted context omitted.

In order: Do you use git? How do you do ticketing? What's it like working here? In my experience engineers at big companies will not give you an answer to those, but canned marketing responses. I don't know why.

You have to be more sneaky. Rather than asking something as generic as >What's it like working here? ask them >What do you like the most about working here? If they give you something like "the stability" or "the high pay" those are generally bad signs. Better signs would for example be "the great people I get to work with every day" or "the autonomy to get to choose what I work on".

Very true, looking at the types and state of the cars in there car park and haveing a chat with the smoking cabals outside fire exits is often a easier way to get a answear to some degree.

But indirectly asking questions is the way and it is those clever ways that are the types of questions i'm realy interested in, like my question about ISO/BS standards, it opend them up to so much more than a simple yes and no and gives you insight into other area's. Like working conditions, are they documented well, badly, not at all, do they even know about those standards, is it something there looking at (often crops up that last answear on many area's sadly).

Is the pay individual perofmance based or team based and is it limited/capped in that if I do 200% better am I capped at some rate of inflation % rise anyhow. I also like to ask about problems, what was the worst day like this past year and why and how likely is that to happen again. That tells you alot about so many area's and also opens them up into telling you how it is as well as allowing you to highlight your relevant skills and chip in with did you try this or that at the right times, even if you agree and play noddy whilst they talk.

One I always ask is can I have a look around the office, the area were I would be working if I was to be offered a position. That is useful in guaging there interest as if they are not interested they will come up with a reason why they can't do that, if they are keen for that you can see what your dealing with and also get a good feel from the way others have there desks decorated. Be they anal, stuffed south park toys, simpsons posters, collection of 2600 mags. Those type of things, you can get a feel on many levels from that.

Asking them how long they have been there is another good one, longer the better, but if they sound bitter then you can take that as not a good sign as well. Though if there two hyper only been there few months then they are sadly not realy able to give you a a true picture, so again take advantage of there hyper still all new to me as well fun happy time mood and take a look around.

Post reply on HN