Inspired byÂ https://www.interviewcake.com/article/python/coding-interview-tips I thought I could make a variant. We’re no longer talking about a coder and an interviewer, we’re talking about a solution provider and their client.
Sometimes you’ll get stuck. Relax. It doesn’t mean you’ve failed. Keep in mind that the clientÂ usually cares more about your ability to cleverly poke the problem from a few different angles than your ability to stumble into the correct answer. When hope seems lost, keep poking.
Draw pictures. Don’t waste time trying to think in your headâ€”think on the board. Draw a couple of different test cases. Draw how you would get the desired outcomeÂ by manual effort. Then think about translating your approach into product.
Solve a simpler version of the problem. Not sure how to find the 4th most importantÂ demographic in the market? Think about how to find the 1st-most-important and see if you can adapt that approach.
LaunchÂ a naÃ¯ve, inefficient solution and optimize it later. Use brute force. Do whatever it takes to get some kind of launch, traction, or engagement.
Think out loud more. ShowÂ what you know. ShowÂ what you thought might work and why it won’t work. You might realise it actually does work, or a modified version does. Or you might get a hint from the client.
Wait for a hint. Don’t stare at your clientÂ expectantly, but do take a brief second to “think”â€”your clientÂ might have already decided to give you a hint and is just waiting to avoid interrupting.
Think about the bounds on timeÂ and effort. If you’re not sure if you can optimise your solution, think about it out loud. For example:
- “I have to at least look at all of the items, so I can’t do better than market testing.”
- “The brute force approach is to test all possibilities, which is incredibly lengthy.”
- “So, because the answer will contain n^2nâ€‹2â€‹â€‹ items, it follows thatÂ I must at least spend that amount of time.”
Thanks to Parker Phinney and Cake Labs. No intent to violateÂ https://www.interviewcake.com/terms-and-conditions