Advice > Software engineering

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

By Max Serrano on 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!

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:

Meta logo rendered in 3D
Software engineeringMar 15, 2024
Meta Job Offer Negotiation (4 Steps to a $50k+ Increase)
Negotiating an offer can feel uncomfortable and stressful. But going through this short-term pain is worth it. As an example, getting a $50k increase is common at the L5 level when negotiating well.
Read more
a female FAANG candidate smiles next to a whiteboard
Software engineeringNov 15, 2023
FAANG interview questions (SWE, PM, etc) + answers
Comprehensive list of FAANG interview questions for software engineers, product managers, engineering managers, etc. With links to high-quality answers, frameworks and explanations.
Read more
woman preparing for Google hypothetical questions
Software engineeringDec 03, 2024
Google’s Hypothetical Interview Questions (examples, tips, prep)
Complete guide on how to answer Google's hypothetical interview questions. Includes example questions, interviewing tips and best practices, and a prep plan to help you ace your interview at Google.
Read more
Candidate preparing for Amazon leadership principle interview
Software engineeringAug 08, 2024
Complete guide to Amazon Leadership Principles Interview Questions (+ answers)
The complete guide to the Amazon Leadership Principles interview: learn what to expect and how to answer, with insights and tips from ex-Amazon interviewers. Practice with over 60 example questions, see example answers, and find links to high-quality prep resources.
Read more
A group of engineers collaborating at a whiteboard, discussing technical diagrams and equations during a team problem-solving session
Software engineeringSep 18, 2025
Google Site Reliability Engineer (SRE) Interview (questions, process, prep)
Complete guide to the Google site reliability engineer interview. Understand the interview process, learn what questions to expect and see how to prepare. Plus, links to more great free SRE resources.
Read more
Sorting interview questions
Software engineeringNov 19, 2021
54 sorting interview questions [easy, medium, hard]
54 sorting interview questions, all with links to high-quality solutions, plus an interview preparation guide. Part 4 of our algorithms questions series to help you practice for your software engineer interview.
Read more
Airbnb software engineer interview
Software engineeringSep 22, 2020
Airbnb software engineer interview (questions and process)
This is a complete guide to Airbnb software engineer (SWE) interviews. It covers Airbnb's interview process, practice questions, and preparation tips.
Read more
a candidate going to a FAANG interview
Software engineeringAug 28, 2025
How do I know if I'm ready for a FAANG interview?
How do you know if you're ready for a FAANG interview? Check out this article to learn how to assess your own interview readiness, with insights from FAANG coaches and successful candidates.
Read more