I was in a similar situation 3 years ago. Like other people said, I'd focus on growth-stage startups (Stripe, Checkr, Airbnb, Opendoor, etc). I found their interviews more practical and approachable than Facebook, Google, etc. Most of the places I interviewed had me writing and running real code on my own computer.
I spent about a month prepping with:
* Cracking the Coding Interview
* https://www.interviewcake.com: curated set of ~50 questions with excellent step-by-step hints that don't immediately spoil the whole problem. Well worth the $250 — I didn't do any Leetcode-style problems aside from these.
* https://interviewing.io: Real, anonymous phone screens. This was amazing for me because I hadn't done a technical interview in 4 years and going through a real interview with a real person is totally different than practice problems.
Companies in SF will cover your costs to interview and usually will give you a relocation bonus as well, so don't discount moving down here :)
FYI, interviewing.io has its own tech screen performed by codility.com. One of their questions could be likened to a novel, and by the time I read through what computations I would need to perform to alleviate the protagonist's issues, the time was nearly up.
As someone without a CS degree, I want to second how good Interview Cake. It probably depends upon how you like to learn, but I found the interactive style of the site "clicked" with me. The UI is great, and the organization of the materials is also very clean. I found it friendlier & easier to work with than Cracking the Coding Interview.
I also got lucky -- the question for my phone tech screen at the company I wound up accepting an offer from was almost identical to one of the Interview Cake questions I'd worked.
I paid for whatever the shortest term membership was in the weeks I was preparing for interviews, and it was worth it.
OOC, does anyone know of a list of growth stage/fast growing companies out there? I feel like I remember seeing something like this a couple years ago but can't remember what it was called
"You are given two eggs, and access to a 100-storey building. Both eggs are identical. The aim is to find out the highest floor from which an egg will not break when dropped out of a window from that floor. If an egg is dropped and does not break, it is undamaged and can be dropped again. However, once an egg is broken, that’s it for that egg.
If an egg breaks when dropped from floor n, then it would also have broken from any floor above that. If an egg survives a fall, then it will survive any fall shorter than that.
The question is: What strategy should you adopt to minimize the number egg drops it takes to find the solution?. (And what is the worst case for the number of drops it will take?)"
Uh, if you drop an egg out of the first floor window onto cement, it will break.
The answer should be a form of binary search, but since you only have two eggs, you'd have to do a sequential search from the bottom floor. You have one chance at a mistake, so I would almost say start with the 2nd floor, but I know it will break on the first floor.
I don't see how that in any way gauges programming what so ever.
>The answer should be a form of binary search, but since you only have two eggs, you'd have to do a sequential search from the bottom floor. You have one chance at a mistake, so I would almost say start with the 2nd floor, but I know it will break on the first floor.
yeah, sorta. essentially you partition the 100 floors into some number of groups (i forget what partition length is optimal) and drop the first egg at each segment until it breaks, then go linearly from the previous one
A quick naive not completely optimal but still relevant solution:
Since you have 2 eggs you can start on the 33rd floor. It breaks you can use the 2nd egg from 1st to 32nd floor.
If it doesn't break, use the first egg on the 66th floor. If it does break, the answer is between 33 and 65, if it doesn't the answer is between 66 and 100. That cuts the maximal testing time time from splitting at 1/2 (1st egg at flr 50), to 1/3rd.
To optimize further, since in the bad case we'd have to search up to 34/35 floors, you can mathmatically find a number where you split the drops at an interval (IIRC the "real" optimal answer is 14, then 13, then 12, etc), which means you're doing less explicit checking.
At 14 - i, you have 10 drops to find a range of 13 - i floors in which the optimal path is found. So instead of a worst case of 35, you have a worst case of around 17.
I find the best way to approach this sort of problem is to first find one optimization, and then use the same process to find if there are further optimizations.
It's not the worst type of puzzle except if you do not know of a solution it might take a while to figure it out.
It does relate to programmer's ability to amortize worst case running time.
Once you realize that 1 egg requires linear search you just have to realize that with 2 eggs you have to decrease the level increase by 1 on each success.
Of course those must be some crazy genetically modified eggs.
>It's not the worst type of puzzle except if you do not know of a solution it might take a while to figure it out.
I would guess the interviewer probably rates people who have memorized the solution far higher than people who have never encountered it and solved it with their brains.
Hmmm, that's an interesting question. It's the Price is Right closest without going over solver...
Practical answer, drop from the first floor and then the second. You're probably not going to make it to the third.
I don't want to put my actual answer in case others want to solve it. But I will say there's an obvious solution, but if you apply one of the hard problems of computer science you might eke out a bit of an edge.
EDIT: Actually I don't think that's right. I think the answer varies based on your expectations, and should be tuned after each run if you run the same test multiple times. I do have a good starting point in mind though.
After thinking about it on the ride home today, I was not quite on the right track before. Again don't want to post my solution because the entire point in asking was so that people could see the question and work it through themselves.
Because eggs that don’t break when dropped even 3 ft (never mind multiple floors) are a thing? Perhaps I am just projecting my Earth based experience...
Maybe it's a shittest if you actually try to apply some theory rather than using your common sense and say that "Based on the last time I was in New York, it will definitely break dropped from the first floor"
As our system matured, we added redundancy in our core system components and split up non-core core systems. This allowed us to immediately deprovision malfunctioning servers, timeout misbehaving 3rd parties and/or fix-forward quickly, resulting in a really low TTR compared to our TTA (which is also pretty low in the recent months)