return to overview

Preparing for the Interview

Before the Interview

Key Tips

During the interview

Key Tips

1. Clarify - Make sure you know what is being asked! Paraphrase or rephrase the question until you and your interviewer are on the same page.

2. Examples - One of the most important steps! Write tests cases / create examples.

3. Brute Force - Use the brute force approach for your initial solution. A solution that answers the question is better than no solution at all.

4. Optimization - There are five different ways to optimize

4.1. Follow BUD and ask yourself the following questions:
* Bottlenecks: What is the slowest part of the code? Is there a better way to accomplish this task?
* Unnecessary Work: Is the code checking for anything that doesn’t need to be checked?
* Duplicate Work: Is the code calculating anything twice?
* If this is the case, save the value under a variable so it is only calculated once.

4.2. Use the DIY approach * If I were a machine, how would I run this code? Can I implement that to make the code more efficient?

4.3. Simplify and generalize * Try to reduce the constraints then afterwards attempt to generalize your solution

4.4. Analyze the base case * Identify the base case, and build upon it.

4.5. Brainstorm data structures * Test a few and list drawbacks and benefits. Choosing the right data structures could be the key to completing the problem.

5. Code the Solution (and use good coding practices)

6. Test using examples from step 2 - If you’ve gotten this far, make sure your interviewer is on the same page as you.

7. Walkthrough and overview your solution - Similar to the previous step, explain your code

After the Interview

Here’s a detailed version with additional information of above

Want Practice?