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

Practice with experts

Using coding interview examples is a key part of your interview preparation, but it isn’t enough.

If you have any friends or family who are engineers, practice with them as they'll be able to give some useful feedback. However, if you really want the best possible preparation for your coding interview, you'll also want to work with engineers who have experience running interviews at Google, Amazon, etc.

If you know anyone who fits that description, fantastic! But for most of us, it's tough to find the right connections to make this happen. And it might also be difficult to practice multiple hours with that person unless you know them really well.

Here's the good news. We've already made the connections for you. We’ve created a coaching service where you can do mock coding interviews 1-on-1 with interviewers from FAANG firms. Start scheduling sessions today!

 

Related articles:

System design interview prep
Software engineeringJul 11, 2023
System design interview prep (6 steps to an offer at FAANG)
Complete guide to system design interview prep. Learn what to expect, and practice with questions from Facebook, Google, Amazon, etc.
Read more
Hand holding phone displaying Google Maps route
Software engineeringNov 14, 2022
Google system design interview guide (questions, process, prep)
Everything you need to know about Google system design interviews, including the process, 45 sample questions, example answers, and an answer framework.
Read more
Tech resume examples
Software engineeringJul 24, 2024
Tech Resume Guide (+11 FAANG examples that worked)
11 real tech resume examples that got interviews at FAANG companies including Google and Meta. Plus, step-by-step guide to writing a technical resume, a free tech resume template, and pro tips.
Read more
divide and conquer interview questions
Software engineeringDec 17, 2021
50 divide and conquer interview questions [easy, medium, hard]
50 divide and conquer interview questions, all with links to high-quality solutions, plus an interview preparation guide. Part 8 of our algorithms questions series to help you practice for your software engineer interview.
Read more
Facebook production engineer interview
Software engineeringJul 20, 2022
Meta production engineer interview (questions, prep, and process)
Complete guide to Meta (formerly Facebook) production engineer interviews. Learn the interview process, practice with example questions, and learn key preparation tips.
Read more
How to answer the Why Facebook interview question
Software engineeringFeb 16, 2023
How to answer the "Why Meta?" interview question
"Why Meta?" or "Why Facebook?" is a question you are almost certain to come across in your interviews. In this article, we give you four concrete steps to craft your perfect answer to the question, including a sample answer.
Read more
How to answer system design interview questions
Software engineeringDec 21, 2021
How to answer system design interview questions
Everything you need to know to answer system design interview questions at top tech companies like Facebook, Amazon, and Google. Learn a framework and practice with an example answer.
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