Introduction
Welcome to Spiral 50.
My name is Amir, and I am an ex-Meta software engineer. While working at Meta, I conducted about 100 coding interviews. I really believe that most candidates fail because they did not prepare enough or prepared the wrong way.
So I built this course to help you prepare efficiently with the 50 most common interview problems.
The only prerequisite is basic coding skills in any programming language. Follow this course to get ready for your next coding interview and learn how to approach any coding interview problem.
How it works
This course uses spiral learning, a method where the concepts you learn come back several times in later problems.
The lessons and problems are split into four chapters, and each chapter introduces several new techniques for solving problems.
So you build your technique basket along the way, and each problem you face might need any technique from previous chapters.
This way you learn to recognise which technique to use and reinforce what you learn through repetition.
- Array, not learned
- String, not learned
- Sorting, not learned
- Bit manipulation, not learned
- Hash table, not learned
- Stack, not learned
- Queue, not learned
- Heap, not learned
- Two pointers, not learned
- Binary search, not learned
- Prefix sum, not learned
- Sliding window, not learned
- Linked list, not learned
- Tree, not learned
- Binary search tree, not learned
- Trie, not learned
- Graph, not learned
- DFS, not learned
- BFS, not learned
- Topological sort, not learned
- Shortest path, not learned
- Backtracking, not learned
- Greedy, not learned
- Dynamic programming, not learned
The main focus is learning to solve problems, so do not spend too much time reading each lesson. Lessons are more like helper material. Read them quickly and come back to them when you are stuck on a problem.
However, some lessons contain practical exercises to implement a data structure or an algorithm. I only included the most common ones that can be asked in an actual interview, so it is recommended to do them.
The chapters and the problems within each chapter are ordered by difficulty, so it is recommended to follow the roadmap in order.
How to solve the problems
While solving a problem, try to simulate a real interview. Instead of writing the code straight away, follow these steps:
- Explain the approach out loud before writing any code (use the editor for pseudocode or a simple drawing).
- Name its time and space complexity.
- Check that the approach works for all cases.
- Decide whether to implement the approach or look for a better one (while practicing, it is recommended to implement each approach, in a real interview, discuss it with the interviewer).
- Implement the solution in compact, clean code.
- Verify the solution by following the code line by line on a few different inputs, including the edge cases.
- Submit the solution (ideally your first submission should pass).
- Repeat the same steps for the other approaches.
By following these steps in an interview, you show several positive signals: problem-solving skills, communication, checking that the solution works for every case, and code quality. These signals are no less important than a working solution itself, so build the habit of showing them while you prepare.
If you are stuck at any step, the solution page can help:
- If you are stuck finding or explaining the approach, look at the illustrated explanation first and try to implement the code yourself.
- If you struggle to implement or understand the code, use the built-in debugger that visualises the code line by line.
Even if you solved the problem yourself, open the solution page to check if there are other solutions and to compare your implementation with the solution code.
In a real interview you might not need to implement every possible solution, but it is good practice while preparing, because you see how different techniques work on the same problem.
Please share feedback
If you have any questions, want to report a bug or share feedback, please reach out to [email protected].
If you like the course and the idea of spiral learning, please share it with your friends and invite them to go through it as well.
Final advice
If you plan to get a job in the near future, do not wait until you complete the course. Apply right now. The course takes several weeks, while getting an interview might take much longer.
Remember that you can never be 100% ready. Even if you do not feel prepared, taking real interviews is the best thing you can do for your preparation.
Good luck!