How to Ace Coding Interviews. The Ultimate Guide

Image for post
Image for post

Why should you read this guide?

Outline

How to prepare

Mindset

How to practice

Image for post
Image for post

Emulate the interview set-up

Expand your toolbox

const vector<vector<int>> dirs = {{1,0}, {-1,0}, {0, 1}, {0, -1}};
for (const auto& d:dirs) {
const nextRow = row + d[0];
const nextCol = col + d[1];
}

Keep a log of common mistakes you make

Iterations

Tech knowledge

Image for post
Image for post

What you should know

Data structures

Algorithms

Programming languages

More resources

MIT courses on algorithms

Introduction to algorithms

Elements of programming interviews

Cracking the coding interview

Mistakes to avoid

1. Not preparing

2. Not communicating what you think

3. Not asking clarifying questions

4. Solving the wrong problem

5. Wasting time

6. Not testing your code

7. Not debugging it

8. Poor time and space analysis

9. Going for the optimal solution

10. Not being fluent enough in your language of choice

11. Edge cases

12. Low-quality code

13. “Hacking” mistakes away

14. Jumping straight into code

15. Not managing space well enough

16. Asking for feedback at the end

Examples

Example 1

Solution

Example 2

Solution

Conclusion

Learn to think like a software engineer. Ex SDE @amazon. Currently SDE @ebay. Find me on Twitter @codinglanguages

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store