Advice > Software engineering

47 Coding interview examples with answers (in Python, Java, C++, Etc.)

By Max Serrano Last updated: July 27, 2023 How we wrote this article
a laptop split screen, with code on one side and a video call participant on the other

One of the best ways to prepare for coding interviews is by studying coding mock interview examples. 

There are a lot of free videos out there, but it’s hard to know what language they’re actually using without watching them.

In the article below, we’ve listed the best mock interviews available on YouTube for the most common coding language. 

We hope this list saves you time!

On a time crunch? You might want to check out our last-minute coding interview prep guide first.

Click here to practice coding interviews with FAANG engineers

1. Python coding interview examples

2. Java coding interview examples

3. C++ coding interview examples

4. Javascript coding interview examples

5. SQL coding interview examples

6. How to prepare for coding interviews

One of the main challenges of coding interviews is that you have to communicate what you are doing as you are doing it. Having to think, code, and communicate your thoughts to the interviewer all at the same time is not easy.

With that in mind, don't let the first interview you do be the real thing. Instead, we highly recommend getting some mock interviews under your belt. 

6.1 Practice with peers

If you have friends or peers who can do coding 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. 

6.2 Practice with experienced coding interviewers

In our experience, practicing real coding interviews with experts who can give you company-specific feedback makes a huge difference. If you're still canvassing expert coaching services for coding interviews, check out our guide to the best coding interview coaching websites.

Or you can skip straight to finding a coding interview coach here, 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!

Click here to book coding mock interviews with experienced FAANG interviewers.
 

Related articles:

people management primer for tech interviews
Software engineeringFeb 16, 2023
People management primer for tech interviews (competencies, questions, resources)
Demonstrating people management skills key to the interview process for managerial roles at companies like Amazon, Meta, and Google. We provide you with the top people management competencies, lists of practice questions, and an interview preparation plan.
Read more
using Amazon app as research for Amazon resume
Software engineeringJun 26, 2025
8 Amazon Resume Examples (+ tips on how to optimize for Amazon)
8 real examples of resumes that worked for Amazon. Plus, all the info you need to optimize your resume/CV for Amazon, including tips, a checklist, and a step-by-step guide.
Read more
software engineer resume keywords
Software engineeringMar 31, 2025
40 software engineer resume keywords recruiters look for
List of software engineer resume keywords and buzzwords that ATS and companies like Google, Facebook, and Meta look for. Also includes a sample resume you can download and free guides to write a killer resume.
Read more
DoorDash Engineering Manager Interview (questions, process, prep)
Software engineeringJun 09, 2026
DoorDash Engineering Manager Interview (questions, process, prep)
Complete guide to DoorDash engineering manager interviews. Learn more about the role, and the interview process, practice with example questions, and learn key interviewing and preparation tips.
Read more
A glowing Google logo
Software engineeringMay 11, 2026
Google Online Assessment Guide for Software Engineers (tips and prep)
This guide covers Google's online assessment for software engineer applicants: how it works, questions and topics to expect, and how to best prepare for it.
Read more
Gray Xbox controller resting on a striped, quilted blanket with natural sunlight casting shadows across the surface
Software engineeringJun 03, 2026
Microsoft Software Engineer Interview (questions, process, prep)
Complete guide to Microsoft software engineer interviews. Learn more about the role, the interview process, practice with example questions, and learn key interviewing and preparation tips.
Read more
Young woman smiles while answering a behavioral interview question
Software engineeringApr 27, 2026
40+ Most Common Behavioral Interview Questions (+ answers)
A comprehensive list of the most common behavioral interview questions, complete with expert advice and example answers. Plus, how to use a framework that's better than STAR.
Read more
Smartphone screen displaying a grid of AI app icons, including Character.AI, Perplexity, App Store, Claude, Copilot, ChatGPT, DeepSeek, and Gemini, with time and status indicators at the top
Software engineeringJun 09, 2026
How to answer "Why Anthropic?" interview question (+ example)
Today, we're going to give you four actionable steps to craft the perfect answer to the "Why Anthropic?" interview and application question. You can work through all of them in a matter of hours.
Read more