Live data from Hacker News

Data Structures for Coding Interviews

interviewcake.com

61–70 of 238 posts

Re: Data Structures for Coding Interviews

#63
post #32

This is a good cheat sheet for those who don't have (or have forgotten) the knowledge but want to game an algorithm heavy interview. The problem I got with this is exactly the same as when I tried reading the "Cracking the Coding Interview" book: I got through a few chapters and then the author mentions something off the cuff with an assumption that the reader will know what they mean. But of course, I don't, because…

i have the same feelings about "cracking the coding interview"

the day someone unironically asks me to "Write an algorithm to print all ways of arranging eight queens on a chess board so that none of them share the same row, column or diagonal" - I will jump off a bridge

Re: Data Structures for Coding Interviews

#64
post #38
post #9

Earlier quoted context omitted.

It's unfortunate, but all the companies are doing this. Here's what a Google lead said in a tweet: > Hello, my name is Tim. I'm a lead at Google with over 30 years coding experience and I need to look up how to get length of a python string. DHH: > Hello, my name is David. I would fail to write bubble sort on a whiteboard. I look code up on the internet all the time. I don't do riddles. Max Howell: > Google: 90% of o…

Ah, the perennial apologetics of weaponized mediocrity. If you can't write a simple recursive algorithm that swaps two values (Max Howell), two nested for loops (DHH), or show me that you used Python at least once (uhh length? yes, there is this builtin, I forgot its name...), why would I want to hire you over someone who has seen a computer before? And to avoid being called hypocritical, here's off the top of my hea…

That's not bubble sort.

Re: Data Structures for Coding Interviews

#65
post #56
post #50

I once walked into an interview with such questions. On the first question I asked them why they asked the question. The interviewer looked puzzled and asked me to finish the question. I again asked him why, what part of my job would require it. He couldn't answer that question whilst he was an engineer at the department I was interviewed for. I asked a follow-up question if he had the same questions when he joined,…

> I could have answered the question easily but what for? To show that you're not a complete diva who's willing to put in some work even if it's unpleasant? The question I ask is not real, either. It's entirely contrived. But I ask it because it's the best way I know to identify candidates who: 1. Can think critically about a data structure. 2. Can communicate with me about how to solve non-trivial problems. 3. Can t…

First, if he would have given that answer instead of saying others did it I would have answered the question. However, his answer indicated they asked just because of asking.

Second, even when you have those reasons ask questions on actual situations that would occur on the job. You run a large C# code base that struggles with its size and configuration complexity vs flexibility? Ask questions on how he would design a new speculative module for the Platform. What kind of pitfalls would he foresee? What would he focus on? See if his answer include your struggles indicating he understands what his daily job is about. If you search an engineer to speed up your image processing pipeline which is C++, data structures can be fine but don't forget that before optimizing them you probably have to spend a lot of time optimizing the design of the entire pipeline so also ask questions about that part.

My main advice is think before you ask. If you have valid reasons, feel free to ask data structures. If you don't, think again.

Re: Data Structures for Coding Interviews

#66
post #56
post #50

I once walked into an interview with such questions. On the first question I asked them why they asked the question. The interviewer looked puzzled and asked me to finish the question. I again asked him why, what part of my job would require it. He couldn't answer that question whilst he was an engineer at the department I was interviewed for. I asked a follow-up question if he had the same questions when he joined,…

> I could have answered the question easily but what for? To show that you're not a complete diva who's willing to put in some work even if it's unpleasant? The question I ask is not real, either. It's entirely contrived. But I ask it because it's the best way I know to identify candidates who: 1. Can think critically about a data structure. 2. Can communicate with me about how to solve non-trivial problems. 3. Can t…

Non-trivial is a subjective thing though. I see people asking the edit-distance problem for example, that was an award winning research paper a few years ago! Also, how do you differentiate between candidates who've seen your question before vs others seeing it for the first time? Most interviewers calibrate on one question. I think the scales these days have tipped on the side of luck. If you've practiced a shit ton of questions and you're asked one of them or closely resembling them, you're golden. Otherwise, you're screwed! I know of several current Googlers who'd attest to this.

In addition to that, it's entirely possible that the candidate is tired after 5 rounds of interviews and isn't able to think straight. But you're right, I don't think a better alternative exists yet.

Re: Data Structures for Coding Interviews

#67

The article is really well written and has amazing design, but honestly does not seem very helpful. Isn't most of this learned in the first year of university? Who is the target audience in that case? Given the title, I hoped to learn some lesser used data structures rather than what a pointer is. With that said, I do look forward to future articles!

Author here :) Thanks for the note--this is interesting.

Target audience is folks who never learned this stuff, or learned it but forgot it. Interesting to hear you had a different assumption from the title.

If you want something trickier, check these ones out:

https://www.interviewcake.com/question/stock-price

https://www.interviewcake.com/question/swift/find-duplicate-...

Re: Data Structures for Coding Interviews

#68
post #53

Earlier quoted context omitted.

CEO of Interview Cake here. We work really hard at trying to not do this. Feedback on where folks get left behind is pure gold to us, because it lets us know what we need to smooth out next. We're not trying to be the /biggest/ resource out there--we're trying to be the /smoothest/. For this article, do you remember where specifically you got left behind?

To be fair to your article, it actually reads quite well and has good detail for what's covered. I thought the big-o coverage was a bit sparse, but I also didn't see the expand link the first time.

Eep. Second person to say that in this thread.

We had it in one of those gray boxes in an earlier draft (so you didn't have to click anything to see it). We'll probably move it back out.

Re: Data Structures for Coding Interviews

#69
post #65
post #56

Earlier quoted context omitted.

> I could have answered the question easily but what for? To show that you're not a complete diva who's willing to put in some work even if it's unpleasant? The question I ask is not real, either. It's entirely contrived. But I ask it because it's the best way I know to identify candidates who: 1. Can think critically about a data structure. 2. Can communicate with me about how to solve non-trivial problems. 3. Can t…

First, if he would have given that answer instead of saying others did it I would have answered the question. However, his answer indicated they asked just because of asking. Second, even when you have those reasons ask questions on actual situations that would occur on the job. You run a large C# code base that struggles with its size and configuration complexity vs flexibility? Ask questions on how he would design…

I think that's putting the cart before the horse. Every company I've worked for has had a hard enough time just finding people with basic coding literacy. Finding somebody with good problem solving, communication, and programming skills is the hard part -- wondering if that person is the guy to architect a specific aspect of our platform is secondary. I can't speak for that job in particular but if half of your promising-looking candidates are getting weeded out by simple programming puzzles the bar tends to shift.

Re: Data Structures for Coding Interviews

#70
post #54

Earlier quoted context omitted.

> For mock interviews, definitely check out: > http://interviewing.io/ I got this recommendation about a year ago and tried. The site stated that I couldn't register, but I could sign up for a place in the registration queue. So I did that. I have yet to hear back from them. I don't quite understand how people keep recommending them, as if it was possible to use the site.

Hey, I'm the founder of interviewing.io. We're coming out of private beta soon, which means we'll be sending out invites to folks on the waiting list shortly. A year is a long time though, and I'm sorry you had to wait that long, so I figured least I could do was kick you an invite (check your email). Thanks for being patient with us while we figured things out.

I guess it's a nice gesture, but this does nothing to address my point that, as far as I can tell, recommending interviewing.io to anyone is wildly inappropriate, and I can't see how it happens at all. (Not that you're the proper person to address that; it's more of a question for gameguy43 et al.) Are the people giving interviewing advice not actually even attempting to do the things they're recommending?
Post reply on HN