Don't feel overwhelmed by the interviewing process.
If you know how to prepare — and you take all necessary steps — you can tackle anything the interviewers throw at you. Which means that sooner or later, you’ll get one of those high-paying jobs, to start your coding career off on the right foot.
Coding Interview Preparation - The 7 Steps
This is how you'll succeed, in a nutshell. Follow this roadmap for your coding interview preparation. Internalize the seven steps. Focus and execute them as well as you can. Get that high-paying Software Engineer job.
1. Prepare your portfolio
There's few things interviewers love more than when they can see with their own eyes the real-world results of your coding skills.
Tip: When you send in your resume, include your portfolio.
Designers do this — and engineers should, too: It'll make you stand out.
The more side projects you complete, the more likely you’ll learn how to code effectively and land a job:
2. Enter their sphere
The next step for you to go into your coding interview with unshakeable confidence:
Become an expert on THEIR company. And get in touch with them early on.
Now you know about their history and current events. You know what they value. And you've gotten to know your interviewers and potential future coworkers.
You've even learned how to best prepare yourself — from people who've recently gone through their interviews.
Each of these will give you an advantage going into your coding interview.
3. Think like a winner
4. master coding interview questions
Answering the technical questions well is of course a big part of getting the job offer. Follow this guide to to ace the technical part of your interview.
Learn how to problem-solve
You won't crush your coding interview by just memorizing problems.
The goal is to understand things at a higher level.
You want to be able to take a problem you've never seen before, break it down, and analyze it. You get which patterns it follows. Then you know how to solve it. And you can explain your process to the interviewer step by step, with confidence.
That's how you solve coding questions effectively. That's how you impress at interviews.
A simple problem-solving process
Prepare for data structures & algorithms questions
Arrays are the most common data structure in programming—and a vital component in determining how information is accessed.
It's one of the darling topics of interviewers and you'll hear a lot of questions about arrays in any coding interview, e.g. reversing an array, sorting the array, or searching elements on the array.
The key to solving array-based questions is having a good knowledge of array data structure as well as basic programming constructors such as loop, recursion, and fundamental operators.
Along with array and linked list data structures, a string is another popular topic on programming job interviews. I have never participated in a coding interview where no string-based question was asked.
A good thing about the string is that if you know the array, you can solve string-based questions easily, because strings are nothing but a character array.
So all the techniques you learn by solving array-based coding questions can be used to solve string programming questions as well.
A linked list is another common data structure that complements the array data structure.
Similar to the array, it is also a linear data structure and stores elements in a linear fashion.
However, unlike the array, it doesn’t store them in contiguous locations; instead, they are scattered everywhere in memory, which is connected to each other using nodes.
In order to solve linked list-based questions, a good knowledge of recursion is important, because a linked list is a recursive data structure.
Stack is a linear data structure similar to arrays and linked lists. The difference is that a stack doesn't allow random access of its elements. It can be conceptualized as a set of elements that can only be added or subtracted jointly and from one direction.
Queue is a linear data structure in which elements can be inserted only from one side of the list (called rear), and the elements can be deleted only from the other side (called the front).
Graphs are nonlinear data structures composed of multiple nodes and edges, or “vertices.” Graphs can represent networking architecture and can be deployed to solve practical problems. Broadly, they describe directed or undirected relationships.
Tree data structure is a data structure that allows you to store your data in a hierarchical fashion. Depending on how you store data, there are different types of trees, such as a binary tree, where each node has, at most, two child nodes.
Along with its close cousin binary search tree, it’s also one of the most popular tree data structures. Therefore, you will find a lot of questions based upon them, such as how to traverse them, count nodes, find depth, and check if they are balanced or not.
A key point to solving binary tree questions is a strong knowledge of theory, e.g. what is the size or depth of the binary tree, what is a leaf, and what is a node, as well as an understanding of the popular traversing algorithms, e.g. pre-, post-, and in-order traversal.
Maps in data structures are abstract data types that store key-value pairs in an array.
The key-value pair associates two pieces of data, and one piece, the ''key,'' can be used to look up the other piece, the ''value.''
A heap is a complete binary tree, and the binary tree is a tree in which the node can have utmost two children. Before knowing more about the heap data structure, we should know about the complete binary tree.
Depth-first search (DFS) searches graphs and trees by beginning at the root node and following each branch as far as it can before it backtracks. DFS may be used to detect cycles in a graph, to find a path, and to locate strongly connected components.
Breadth-first traversal (BFS) examines sibling nodes first and children nodes second. BFS may be used in peer-to-peer networking for finding the shortest path and even in web crawlers used in search engines.
Binary search is a search algorithm that finds the position of a target value within a sorted array. Binary search compares the target value to the middle element of the array. If they are not equal, the half in which the target cannot lie is eliminated and the search continues on the remaining half, again taking the middle element to compare to the target value, and repeating this until the target value is found. If the search ends with the remaining half being empty, the target is not in the array.
Sorting algorithm is an algorithm that puts elements of a list into an order.
A comparison operator is used to set the new arrangement of elements in the data structure.
Dynamic programming is an optimization technique used to solve problems where the same work is being repeated over and over.
A problem can be optimized using dynamic programming if it:
1. has an optimal substructure.
2. has overlapping subproblems.
If a problem meets those two criteria, then we know for a fact that it can be optimized using dynamic programming.
A backtracking algorithms tries to find the right output by considering every possible combination in search.
It does so one piece at a time, and deletes solutions that at any point don't meet the constraints.
A divide-and-conquer algorithm recursively breaks down a problem into two or more sub-problems of the same or related type, until these become simple enough to be solved directly. The solutions to the sub-problems are then combined to give a solution to the original problem.
How to practice coding questions
📆 Make your schedule
If you want to prepare to crush the coding interview:
Give yourself three months of focused study before you even apply for any jobs.
Set aside 2-3 hours per day and work on 2-3 coding questions during that time. By the end of three months, you'll have cracked around 200 problems.
You can then go into your interview with full confidence.
📝Practice solving questions out loud and on paper / whiteboard
In your practice, you want to get as close to the real thing as you can.
Get in the habit of mapping your solutions out visually, asking and answering questions, and talking through your process. This is what you'll be asked to do in your coding interview.
And if you've already been doing exactly that for several months: Guess what — you'll be able to execute it like clockwork.
📱Want a ready-made structure? Choose a coding interview prep platform
If you'd rather not deal with creating your own schedule, picking the best questions to practice, and looking up the best solutions, you might want to invest in a course or preparation platform.
Platforms like AlgoExpert guide you through your coding interview prepping process.
You get the most likely questions curated in an easy format, a built-in compiler to input your code right there, and solutions with step-by-step explanations.
5. Sharpen your soft skills
Level up your soft skills as a developer to prepare for the behavioral part of your coding interview.
3 tips to make a good impression
Prepare Behavioral Answers
Whenever you’re asked a typical behavioral question, you can structure a response using CAT, a framework invented by Saeed Gatson:
Start off by talking about a circumstance you were in, then explain the actions you took to solve the issue, and finally describe your takeaway from the whole experience.
It helps to come prepared with a few circumstances in mind beforehand.
The “Tell Me About Yourself” Question
Use Saaed's NFL approach, which stands for Now, Former, Later.
I've never not been asked this question in an interview. It’s pretty much guaranteed. You might as well ace it.
The Behavioral Traits They Look For
The right developer isn’t just someone who knows algorithms; it’s someone who communicates effectively and knows what it means to be part of a team.
What they look for in the behavioral interview can be summed up in The 4Ps: (credit: Saeed Gatson)
In detail, they're looking for these traits:
Behavioral traits for coding interviews
handling the unknown
As an engineer, you need to be a problem solver. In the coding interview, you have plenty of time to demonstrate that. A common mistake is to try to start writing code as soon as possible.
You must resist this urge.
Make sure you take enough time to understand the problem completely before attempting to solve it. Another big mistake is trying to over-solve the solution on the first iteration.
Keep it simple, don’t try to get fancy.
New engineering roles are on bigger teams, so being able to work on a team and play for the team and be a team player, and not to be an individual contributor will make a big difference for you.
Convince the interviewer that you work well on a team by talking about past projects you did.
Showing you can work on your own time and get stuff done. Again, you can convey this by telling them your process for getting the coding projects in your portfolio finished.
Also, how you allocate time while solving the interview questions will give them hints as to your time management skills as well.
Set up, project your voice, open chest and be confident with everything you say. or at least try to be confident.
Aim for 'relaxed confidence' during your interview.
You're ready for what's coming. But you're not too attached to the outcome. That shows in how you carry yourself -- and a great personal presentation can win interviewers over.
Listen well. Be to the point in your answers. Don’t lie about your skills or projects!
Prepare questions for THEM. Adjust to your audience -- be perceptive and empathetic: Know who you’re talking to and how to tailor your conversation to them.
Show your passion for the company, for writing code, for finishing projects with your tone of voice.
Instead of freezing, you: Ask the right questions. Take a high-level view and see if you can chunk it down.
You'll be able to impress your interviewers if you can keep your cool under pressure, and stay optimistic and solutions-oriented, even if it's hard.
How to improve your soft skills before your coding interview
Social skills respond well to frequent practice.
Seek to put yourself into challenging social situations that require you to be charismatic:
6. practice mock interviews
To be prepared to perform under pressure, simulate the real coding interview environment as much as you can. Mock interviews are the best way to do this.
Again, there's online platforms to help you do these mock interviews. There's two major options:
Do these many times before your coding interview, and you'll be prepared to breeze through it.
7. Prepare to negotiate
Don't forget to prepare yourself for a good outcome!
If you've followed all steps of the study roadmap so far -- then you've maximized your chances of receiving an offer, sooner rather than later.
If you negotiate correctly, you can increase your starting salary at a software engineering job by a good amount—much more than you can ever expect to get from raises.
And second, raises are based off of a percentage of your current salary. That is why it's critical to get a good salary when starting a new job and to negotiate as best as possible.
If you can raise your overall compensation by 10%—which is usually easily obtainable—you can possibly put yourself ahead by 2-3 years in terms of raises, which usually are around 2-3%, but might actually be 0%.
That's a wrap on how to prepare for your coding interview!
For tips on how to act during your coding interview, check out my article with 17 coding interview tips.