Intro to Coding Interviews

In the coding interviews, you typically get one or two algorithmic problems that you need to solve in about 45 to 60 minutes. You also need to code your solution in the programming language of your choice and discuss your solution with the interviewer.

For software engineers, coding interviews usually take the majority of the interview process and are by far the most important. A good performance here is the deciding factor for getting hired.

How to prepare

At the coding interviews, you are asked to solve and code algorithmic problems, so you need to learn to do just that. And probably the best way to learn to solve algorithmic problems is to practice solving a lot of them until you feel comfortable.

Currently, the best website to solve practice interview problems is Leetcode, so I would suggest you to go there and start solving 2-3 problems a day. By doing this, you will improve your problem-solving skills, and will also study real interview problems that may appear on your interviews. For most people, 200 to 400 solved problems on Leetcode should be enough.

There are a lot of tips on how to better use Leetcode, and we will cover them in detail later in the Leetcode section.

Other resources

Cracking the Coding Interview book also has a nice collection of problems and other materials, although nowadays it is not as useful as Leetcode. You can still check it out and read the chapters that are interesting to you.

AlgoExpert is a good-looking website with 100 interview problems and solutions, as well as other interview preparation related materials. It is not free though, so you can check it out and see for yourself if it is worth it for you.

Learning algorithms

While solving problems, you will also find out that you need to know a number of common algorithms and techniques. I would suggest to learn them in parallel to solving problems. We will extensively cover algorithms you need to know in the later Algorithms sections.

I would suggest solving problems for learning algorithms independently from simply solving random problems. These serve two different purposes:

  • After you learn a new algorithm or a technique, it is a good idea to solve several problems using it to better understand and memorize it.
  • At the same time, it is a good idea to solve a lot of random problems, where you don't know in advance which algorithm you will need. This better simulates an interview environment and will train your brain to come up with a solution.

Knowing your language

In the coding interviews, you will be expected to write working code in the language of your choice. So you will need to pick a language you will use, and learn how to use it well. This may include understanding the language philosophy and well-established practices, as well as learning built-in libraries and tools. We will talk more about it in the later Picking a Language section.

Mock interviews

Mock interviews are practice interviews with friends or other people, with the goal of simulating a real coding interview environment. These are a great way to prepare for the real interviews, especially when it comes to explaining your solution to other people or handling the stress of an interview session.

There are several ways how you can organize and run mock interviews, and we will talk about it in detail in the Mock Interviews section.

Coding interview tips

There are many other tips and strategies for successfully passing coding interviews. Read more about them in the Coding Interview Tips section.

Action Items
0 / 1 completed (Log in to complete action items)
1. Answer the following questions:
  • How to prepare for the coding interviews?
  • Why you should solve some problems to practice algorithms, and some problems to practice coming up with solutions? What is the difference?
  • What are mock interviews and why are they useful?