The Coding Interview Preparation may seem like an endless task considering the staggering amount of resources available online. With this blog post, I want to help you all by giving a perfect preparation plan that is enough to crack software roles in the majority of the product based companies.
I am assuming that you have no prior knowledge of programming and programming languages, and you are starting from scratch. This plan will take a total of 8-12 months to complete.
We at Programming Pathshala have students who have made into companies like BharatPe and PayPal in a time period of less than a year by following this plan thoroughly with us.
First and foremost, the beginning point of your coding interview preparation is to learn any one programming language. If you are a complete beginner, I would advise you to choose one of C++, Python or Java for starting your journey.
- Learn the basic constructs of programming: Data Types, Control Flow, Looping, Functions, Pointers, Structures and Classes etc.
- Stick to one programming language and develop a command on it. Many people think that knowing programming is equivalent to knowing numerous coding languages which is not true.
- Start implementing common out-of-the-box features supported by this language with respect to certain data structures and algorithms . For example, if you choose C++, learn how to use STL Map, sets, vectors, upper_bound, lower_bound, etc. If you choose Java, learn how to use HashMaps, TreeMaps, ArrayLists, etc.
- Solve at least first 50-100 problems of basic implementations from platforms like Codeforces.
Before deep diving into Data Structures and Algorithms, make sure you are familiar with certain techniques that are used with almost every other DSA concept later on. These techniques include:
- Precomputation techniques in Arrays like simple ideas to handle multiple queries by precomputating the answers.
- Mathematical techniques like computing primes using sieves, doing factorisation, finding lcm & hcf, basic combinatorics. Recursion, recurrence relation and how to think in recursive terms.
- Understand the concept of Backtracking, which helps in writing basic brute force solutions to almost all the problems.
Many people directly start learning Dynamic Programming as soon as they hear about Data Structures and Algorithms. The truth though is that many of the startups and, sometimes, even companies like Amazon focus more on basic Data Structures rather than DP.
- Get a strong grasp on Searching algorithms. It is important to understand what kinds of problems are optimized using the Binary Search algorithm. There are several popular commonly asked patterns like Binary Search on Answer.
- Explore different sorting algorithms and the corresponding concepts involved in it. For example: Merge sort requires the Divide and Conquer algorithm and Two pointers for merging, while Quicksort uses an efficient partitioning mechanism.
- Explore Stacks, Queues and Deques in-depth. Understand what patterns of problems are understandable using Stacks. Some very difficult problems can be solved using Stacks. Eg. Remove K digits to find the minimum number
- Solve a lot of problems on Linked Lists and Binary Trees. Although simple, some problems require very specific solutions, and it is a good idea to know some techniques beforehand. Eg. Watch this Linked List & Binary Tree Live Class by ex-SDE Amazon
Now is the time to start learning Heaps, Greedy, Graphs and Dynamic Programming. These are relatively harder Data Structures and Algorithms, but are extremely important for coding interviews.
- Learn about Heaps Data Structure: Common Operations on Heap like Tying Ropes, Kth Min/Max problems and Heapsort are important.
- Understand Greedy Algorithms and how to prove greed for certain problems. Classical problems like Activity Selection and Job Scheduling should be understood thoroughly as to why particular greed works and others do not.
- Explore Dynamic Programming: Build on Recursion & Backtracking to memorize and convert it into Recursive DP Solution. Tabulate it to convert the same into Iterative DP and also learn how to optimize space.
- Learn about Graph Traversal Algorithms like Depth First Search(DFS) and Breadth First Search(BFS).
- Explore the shortest path algorithms like Dijkstra and Minimum Spanning Trees.
Now that we are done with most of our Data Structures and Algorithms syllabus, it is time to start learning certain core Computer Science subjects, which are equally important for being a good Software Engineering student and being prepared for coding interviews.
- Operating Systems: Learn about Process Management Mechanism, Memory Management Mechanisms and Concurrency Problems & Solutions
- Databases: Understand different databases and how their data models look like. Learn how to model data in case of relational databases using ER Diagram and Normal Forms. Apart from that, understand Transactions and ACID Properties
- Networks: Understand different layers in OSI Model. Learn about common networking devices and protocols and what functions they serve.
After covering theory related ideas in Computer Science, it's time to get some practical knowledge that will make you industry ready.
Codes written in the software Industry are generally organized as classes. Also, there are certain components at System Level that you need to know about.
- Learn about Classes and Objects and understand common Object-Oriented Design Concepts like Polymorphism, Abstraction, Inheritance, Encapsulation, etc.
- Learn about Clean Coding Practices and concepts of Modularity. Understand Design Principles like SOLID Principle
- Learn about Different Design Patterns.
- Learn about Distributed Database Systems, concepts like Sharding, Replication and how systems scale
- Know about concepts like Load Balancers, Microservice Architecture and Forward/Reverse Proxies.
At this point, you would be mostly prepared for any big company out there. You can do a few more things to become more confident in cracking them.
- Create at least one good working project using any latest technology like MERN stack. You can deploy it at some open source platform like Firebase or Heroku and put its link in your resume.
- Give some mock interviews with industry experts or your peers.
- Read some more interview experiences of different people and if you feel weak in any topic, try to revise and practice it more.
- If you get some time, explore some advanced data structures like Tries, Segment Trees, Range Queries, String Matching Algorithms, etc.
Explore advanced data structure here
This is how in 8-12 months you can easily become a very good software engineering resource for any company that you go to. Not only will you prepare for the interview, but also will become a better software developer.
The above blog post covers the sure shot steps to become interview ready within 8-12 months. Many of our students have undergone this curriculum, and we have seen it working. It only requires discipline, dedication and constant endeavors to succeed.