Getting better at coding interviews is essential to landing an offer. But it’s not just about how quickly you can solve LeetCode-style problems. Interviewers also assess how you approach problems, explain your reasoning, and handle unexpected challenges. Knowing what to do in the interview room can make all the difference.
The good news is that we have helped thousands of candidates pass their coding interviews. In this article, we’ve reached out to our expert coaches to bring you specific, actionable insights that will help you get better at coding interviews and land an offer from a top tech company.
- Don’t jump straight to coding
- Use pseudocode to explain your thinking
- Talk through your answer
- Ask for hints
- Listen for subtle hints
- Don’t bluff
- Pace yourself
- Break the problem into smaller tasks
- Keep moving
- Proactively acknowledge tradeoffs
- Test your code
- Save questions for your interviewer
This article was written in collaboration with two expert interview coaches:
Inbar: former Senior Software Engineer at Microsoft, currently a Senior Engineering Manager for DocuSign. Inbar has conducted 100+ interviews and has coached 15+ people.
Ramprasad: former Data Engineer for Facebook, currently a Senior Data Infrastructure Engineer for a biotech company, Ramprasad has conducted 200+ mock interviews and has coached 50+ people.
Click here to practice coding interviews 1-on-1 with coding interview experts
Tip #1: Don’t jump straight to coding↑
If you start writing code immediately after you hear or read the question, this is a huge red flag to your interviewer. For many interviewers, a candidate’s collaboration and communication skills are just as important, if not more important, than a candidate’s technical capabilities.
So jumping into your answer without asking clarifying questions or discussing possible approaches with your interviewer signals that 1) you haven’t thought through the answer, and 2) you won’t collaborate with your interviewer. Both are bad signs for how you will work with the team that you are applying to join.
Even when you are sure of how you will solve a problem, think of a couple of questions to ask before you begin. You can ask about edge cases, performance requirements, any assumptions you’ve made, or anything else that will help you start a dialogue.
Tip #2: Use pseudocode to explain your thinking↑
Interviewers want to understand how you think. When you’re explaining how you’re going to approach a problem, writing pseudocode is an excellent way to outline your plan and show your work to the interviewer.
Of course, by the end of the session, you’ll want to have written actual code that implements what you’d planned out in the first few minutes. Pseudocode is a helpful intermediary step, but don’t forget to check in with your interviewer before using it.
Tip #3: Talk through your answer↑
Interviewers are more interested in understanding how you work and how you think than whether you find the right answer to a problem. They are not only testing your technical knowledge but also your problem-solving skills and your ability to work in a team.
So treat the interviewer as a collaborator, walking them through the steps you’re taking and clarifying any assumptions you’re making. If you need to concentrate on a tricky part, you can take a minute or two to work in silence, but don’t forget to pause and explain what you’ve done before moving on. Of course, be careful not to use any inappropriate language or swear words.
Tip #4: Ask for hints (but not too many)↑
Most interviewers aren’t interested in watching a candidate flounder for an hour. If you get stuck, speak out the points making you confused (e.g. “Here’s what I’m thinking…”), and allow the interviewer to guide you back to the right track.
As a last resort, you can even ask for a hint outright (e.g. “To be honest, I’m stuck. Could you give me a hint of where to go next?”). This isn’t ideal, but it’s better to ask and be able to move forward than to end an interview session without writing any code.
Of course, try not to do this more than one or two times, or else the interviewer will question your problem-solving skills.
Tip #5: Listen for subtle hints↑
On the other hand, you won’t always need to ask for hints if you catch the ones that interviewers are already giving you. If your interviewer tries to steer you in a direction, follow them. 99% of interviewers have good intentions, and they're trying to help you.
Pay attention to what they tell you, and don’t allow yourself to get so stressed that you don't pick up on what the interviewer is saying. If you talk through your answer, as we mentioned before, this will give your interviewer more information and more of a chance to steer you in the direction they want you to go.
Tip #6: Don’t bluff↑
If you’re unfamiliar with something related to the coding question, say it. Do not pretend to know something that you don’t and struggle through it to the end. The interviewer will see through this and dock points.
You can simply state, “I don’t know,” or you could say, “I’m not sure, but I believe that XYZ is the case.” Your interviewer will likely jump in to correct you if you’re wrong.
Alternatively, you can state what you are unfamiliar with and ask to look it up (e.g. “I think a priority queue is the appropriate solution here, but I’m unfamiliar with its library in C++. Could I look it up?”). Some interviewers will allow it, as it would help them understand how you would work to solve problems on the job.
Tip #7: Pace yourself↑
Timing is important, but it shouldn’t be a cause for panic. When you’re working through practice questions, use a watch or another device to help track the minutes. Make sure it’s the same one that you’ll be able to use during the interview itself so that you’re comfortable with checking the time and adjusting your answer accordingly.
If you’re interviewing virtually, you can set up a timer next to your screen that will count down from 45 or 60 minutes, according to the length of your interview.
Follow the framework we mentioned in the prep section above: spend the first few minutes clarifying the question, then take about 10 minutes to make a plan with your interviewer. At 20 minutes in, you should be coding or starting to code. After 40 minutes, you should be testing and optimizing. Watch the clock so that you don’t get bogged down in a tangent.
It is ok to stop and clear your head if you get stuck. A 30- or 60-second pause to regroup and gather your thoughts may feel like an eternity, but will not significantly eat into your interview time. It is better to have one minute of silence than ten minutes of spinning your wheels.
Tip #8: Break the problem into smaller tasks↑
The types of coding questions that are asked in tech interviews can typically be broken down into 2-5 tasks that will each take a few minutes to complete. While you’re making your plan, list out these small steps and explain them to your interviewer.
As you work, cross out each of these steps one by one, and tell your interviewer (e.g. “I have completed task X, and now I will work on Y, then Z.”). This will give you a confidence boost each time you finish a smaller task. It will also give the interviewer a sense of how you will be able to tackle long-term, difficult projects on the job.
Tip #9: Keep moving↑
To avoid getting bogged down in details, get the general code down first and work out specific details afterwards. Don’t aim to find the most optimal solution immediately.
Try focusing on the simplest form of a problem and solving for that first, while clarifying to your interviewer that it is not optimal. Then complexify the problem and solve for that, continuing to expand and optimize as you go.
For example, if you’re given a two-dimensional matrix problem, you can start by solving for a 1x1 matrix, then reevaluate for a 2x2 matrix, then nxn, then mxn, and so on. This method will help you avoid freezing and ensure that you can always answer at least 70-80% of a given problem.
If you can’t work out exactly how to code a specific function, flag it and tell your interviewer what it will do, then come back to it after you’ve finished the rest of the code. This keeps you from breaking your flow and gives your brain a break. You may end up thinking of a better way of going about it than what you had initially planned.
Tip #10: Proactively acknowledge tradeoffs↑
Any decision you make will have a tradeoff. So call them out in real-time, and use it as an opportunity to discuss different options with your interviewer and explain why your choice is the best one. If you don’t bring up tradeoffs, your interviewer will almost certainly ask about them. So it’s better to beat them to it and show that you’ll consider these factors on the job as well.
Tip #11: Test your code↑
Do this before the interviewer prompts you to. Practice debugging as you implement (e.g. using intermediary debugger statements, print statements, etc.) to fix problems as you go.
Once you’ve finished coding, test your code in multiple ways to pinpoint any potential problems. Do unit tests, writing out the inputs and outputs of your code, and replicating the type of testing that a computer would perform.
You should also thoroughly test edge cases. For example, if your code inputs a number, test what happens if that number is negative, 0, or a decimal.
If you do find bugs in your code, don’t get discouraged. Explain what went wrong to the interviewer, and what you could have done differently. If you have enough time, ask if they’d like you to fix it. Take it as an opportunity to show your interviewer how you learn from your mistakes.
Tip #12: Save questions for your interviewer↑
Most interview rounds will finish with a few minutes that you can use to ask your interviewer questions. Neglecting to ask them questions will give the interviewer the impression that you’re not invested enough in the company or the job.
Take some time to consider a good question, rather than something you could have easily researched in advance. You can ask what the interviewer’s experience at the company has been, what you should expect from your position after six months or a year, what is fun about the job or company, what some of their current challenges are, etc.
We hope you find these 12 tips useful as you prepare for your interview. For a 7-step plan that you can use to plot your entire preparation process, as well as links to a selection of the best prep resources, check out our coding interview prep guide.
Got a coding interview coming up?↑
Once you've done some individual practice, we would also strongly recommend that you practice solving coding interview questions with someone else interviewing you. If you have friends or peers who can do mock interviews with you, that's an option worth trying. It’s free, but be warned, you may come up against the following problems:
- It’s hard to know if the feedback you get is accurate
- They’re unlikely to have insider knowledge of interviews at your target company
- On peer platforms, people often waste your time by not showing up
For those reasons, many candidates skip peer mock interviews and go straight to mock interviews with an expert.
Practice with experienced coding interviewers
In our experience, practicing real interviews with experts who can give you company-specific feedback makes a huge difference. It's probably the most efficient and effective way to get better at interviewing, coding or otherwise.
Find a coding interview coach so you can:
- Test yourself under real interview conditions
- Get accurate feedback from a real expert
- Build your confidence
- Get company-specific insights
- Save time by focusing your preparation
Landing a job at a big tech company often results in a $50,000 per year or more increase in total compensation. In our experience, three or four coaching sessions worth ~$500 make a significant difference in your ability to land the job. That’s an ROI of 100x!







