DSA Preparation Strategy
Table of contents
- 📒 Must-Know Topics
- 🙅♂️ Common Mistakes During Preparation
- 😊 Must Do Problems for your Interview Preparation
- 🎉 Situations when Solving the Problem
- ⌚ Time and Space Complexity
- 💪 Understanding Data Structures
- 💁 Practicing Dynamic Programming
- 🔗 Resources for Preparation
- 👮♂️ Focus Areas During Technical Interviews
- 😉 Top Websites for Making Good ATS Friendly Resume
- 💪 Must Check:
The landscape of interviews and online assessments predominantly revolves around a core set of essential elements: data structures, algorithms, and problem-solving strategies. These foundational pillars form the bedrock of technical evaluations and stand as key determinants of success.
📒 Must-Know Topics
Data Structures | Algorithms | Concepts |
Vectors, Arrays, Strings | Sorting Algorithms (Insertion, Merge, Quick, Bubble, Selection Sort) | Bit Manipulation, Two Pointer, Sliding Window |
Hash Tables | Binary Search, Sieve of Eratosthenes, Kadane | Dynamic Programming, Memoization |
Heaps | Graph Algorithms (Prim's, Kruskal's, Dijkstras) | Recursion, Backtracking, Greedy |
Stacks & Queues | Breadth First Search (BFS), Depth First search (DFS) | Time Complexity and Space Complexity |
Linked Lists | Graph Algorithms (Dijkstra's, Prim's, Kruskal's) | Number Theory, Prefix Sum |
Trees, Tries & Graphs | Tree Traversals (Preorder, Postorder, Inorder) | Topological Sort |
Advanced (Segment Tree) | Kosaraju's and Tarjan Algorithm, Floyd’s cycle detection algorithm | Advanced Concepts (AVL Trees, Red Black Trees) |
String Algorithms (Rabin Karp, KMP, Boyer Moore) |
(Reference: https://www.bigocheatsheet.com/)
This comprehensive skill set empowers you to confidently tackle a wide array of challenges, whether they involve optimizing performance, devising ingenious solutions, or uncovering hidden patterns.
To get good at data structures and algorithms, I follow a clear plan.
First, I start by making these data structures myself to understand how they work. Write the code from scratch without any in-built functions or libraries. Then, I switch to using built-in tools like the Standard Template Library (STL) for simpler tasks.
When I'm comfortable with those tools, I solve problems on sites like LeetCode, GeeksForGeeks. I mostly worked on the easier problems to practice initially. I also sort the problems by their data structure tags on LeetCode and GFG when I was picking up a unfamiliar Data Structure.
Question: How do you solve the questions exactly ?
Answer:
📖 Understand the Problem: I read the problem statement carefully to ensure I understand what is being asked, what the inputs are, and what the expected output is.
🔨 Break Down the Problem: If the problem is complex, I try to break it down into smaller, more manageable parts.
🔗 Identify a Strategy or Pattern: I try to identify if the problem fits a known pattern or strategy. This could be a specific algorithm, data structure, or coding pattern.
✂️ Choose the Right Tools: Based on the problem and the identified strategy, I decide on the tools I will use. This could include choosing the right data structures, libraries, or programming languages.
🌿 Write a Plan or Pseudocode: Before I start coding, I write a plan or pseudocode that outlines how I will solve the problem. This helps me organize my thoughts and makes the actual coding easier.
✍️ Implement the Solution: Following my plan, I start coding the solution.
🧪 Test the Solution: After implementing the solution, I test it with various test cases to make sure it works as expected. This includes edge cases to ensure my solution works in all scenarios.
🐛 Debug and Refine: If my solution doesn’t work as expected or could be more efficient, I debug and refine it. This could involve optimizing the code or fixing bugs.
🏫 Review and Learn: After solving the problem, I take some time to review my solution and the process I followed. I reflect on what I learned and how I can apply it to future problems.
Sometimes, one problem can be solved using different data structures. In those cases, I figured out which data structure is the best choice. This helped me learn a lot about properties of data structures and why to prioritise a certain data structure for solving a particular type of problem.
It's important to challenge yourself. If easy problems feel too easy, you know that it's time to move on to the medium-level ones. Spending more time on a medium-level puzzle can teach you more than quickly solving easy ones.
Personally recommend attending Contests happening on various Coding Platforms. I couldn't participate in the LeetCode Biweekly and Weekly Contests at their scheduled times. But I still managed to solve those questions as if I were taking the test in real time. I used a LeetCode Timer Chrome Extension to keep track of the time while solving the questions. This helped me simulate the contest experience and practice under timed conditions.
By doing all of this, I build a strong foundation in data structures and algorithms.
🙅♂️ Common Mistakes During Preparation
Poor Time Management: Students often lack the skill of time management and as a result, they end up searching for last-minute notes, which can lead to low grades. To avoid this, create a study schedule and stick to it. Allocate specific time slots for each subject or topic.
Lack of Proper Planning: Before starting any topic, it’s important to make a proper plan. For example, if you have 2 months remaining for your placement, schedule your daily tasks beforehand. This will help you stay organized and ensure that you cover all necessary topics.
Not Practicing Enough: No prior practice of technical interviews is another common mistake. Regular practice is strongly recommended to succeed in live interviews. Make use of online platforms that offer mock interviews and coding challenges.
Inaccurate Resumes: Another common mistake made by students during placements is that they do not put in the actual truth in their CV. They tend to put in over-the-top skills so that they look impressive in front of recruiters. Always be honest in your resume. Highlight your strengths and achievements, but don’t exaggerate or lie about your skills.
Lack of Company Knowledge: Lack of knowledge about the company you’re applying to can also be a setback. It’s important to research and understand the company’s values, mission, and work culture. This will not only help you in the interview but also help you decide if the company is a good fit for you.
Procrastination: This is a common problem where people delay or postpone their tasks. To overcome this, try to break down your tasks into smaller, manageable parts and start with the easiest part. This can make the task seem less overwhelming and help you get started.
Comparison: It’s natural to compare ourselves with others, especially in a competitive environment like placements. However, this can lead to unnecessary stress and can be demotivating. Remember that everyone has a different journey and pace of learning. Focus on your own progress and improvements.
Self-Doubt: Many students doubt their abilities and this can hinder their performance. It’s important to have confidence in your skills and abilities. If you’re struggling with a topic, don’t hesitate to ask for help or use resources to improve your understanding. Remember, everyone struggles in the beginning and it’s okay to make mistakes. That’s how we learn and improve.
Remember, consistent practice and a well-planned strategy are key to cracking placements.
😊 Must Do Problems for your Interview Preparation
14 Coding Patterns to ace for Coding Interview: https://hackernoon.com/14-patterns-to-ace-any-coding-interview-question-c5bb3357f6ed
Famous Blind 75 List: https://leetcode.com/list/xi4ci4ig/
Good Leetcode Questions (Without Premium): https://leetcode.com/list/p6imdz2d
Study Guide for All Important DSA Topics & Questions (Updated): https://leetcode.com/discuss/study-guide/2903518/dsa-all-topic-imp-questions-2023-updated
Array
Binary
Dynamic Programming
Graph
Interval
Linked List
Matrix
String
Tree
Heap
🎉 Situations when Solving the Problem
✅ The Solution is Accepted:
Even when your solution is accepted, it’s beneficial to make it a regular practice to explore the Discussions Forum or Editorials Section. This is because different individuals may approach the same problem in various ways, some of which might be more efficient or innovative than yours. By reviewing the codes submitted by others, you expose yourself to a diversity of thought and coding styles. This not only broadens your understanding of the problem at hand but also equips you with alternative strategies for future challenges. It’s a continuous learning process that can significantly enhance your problem-solving skills and coding proficiency.
❌ Solution is not Accepted / Partially Accepted:
Persist: Spend another 20-30 minutes trying to solve the problem. Persistence often pays off.
Take a Break: If the problem remains unsolved, take a break. This helps to refresh your mind and can lead to new insights.
Return with a Fresh Mind: After your break, revisit the problem. You might see something you missed earlier.
Revisit Concepts: If you’re still stuck, review the DSA concept related to the problem.
Discuss: Seek help from online communities like StackOverflow or GitHub.
Practice: Remember, regular practice is key to mastering DSA. Don’t give up!
😔 Cannot think of any Approach
When faced with a challenging DSA problem, your first step should be to dedicate a solid 20-30 minutes to attempt the problem. If a solution doesn’t emerge, delve deeper into the topic related to the problem. This can often shed light on potential approaches. If you’re still at a standstill, don’t hesitate to seek guidance. Look for hints in the problem’s dedicated section. If hints don’t lead you to a solution, explore the discuss/solution section for insights. To reinforce your understanding, tackle similar problems. This can often demystify the logic behind the original problem. If the problem still remains elusive, add it to your to-do list and revisit it after a gap of 10-15 days. Sometimes, stepping away can provide a fresh perspective that can crack the problem wide open. Remember, persistence is key in problem-solving. Keep at it!
⌚ Time and Space Complexity
https://www.youtube.com/playlist?list=PLDN4rrl48XKpZkf03iYFl-O29szjTrs_O
Watch Videos 1-16 for understanding the concepts of Time and Space Complexity well. The way Abdul sir explains by the means of examples would surely give you deeper insights into this topic.https://www.youtube.com/watch?v=mV3wrLBbuuE&t=2s
Can refer even this video for better understanding by Kunal Kushwaha.
💪 Understanding Data Structures
https://www.youtube.com/playlist?list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu
This playlist is excellent to get insights into various Data Structures.Additionally, you can refer individual GeeksForGeeks articles written on each Data Structure for better understanding the Data Structure.
💁 Practicing Dynamic Programming
Dynamic Programming (DP) can indeed be challenging, but with the right approach and resources, it can be mastered. Here are some strategies and resources that might help:
Understand the Core Idea: Dynamic Programming is mainly an optimization over plain recursion. The idea is to store the results of subproblems, so that we do not have to re-compute them when needed later.
Learn the Techniques: Familiarize yourself with the techniques used in DP such as memoization and tabulation. Understanding these techniques can help you recognize when a problem can be solved using DP.
Practice Problems: Start with basic problems like Fibonacci numbers, binomial coefficients, or the subset sum problem, and gradually move on to more complex problems. The more problems you solve, the more comfortable you’ll become with DP.
Online Courses: There are several online courses that can help you learn Dynamic Programming. Websites like GeeksforGeeks, Stack Overflow, Udemy, Educative, Pluralsight, and edX offer comprehensive courses on DP.
Code Challenges: Participate in coding challenges on platforms like LeetCode, HackerRank, and CodeSignal. These platforms have a variety of problems dedicated to DP, and they provide solutions and explanations which can be very helpful.
Study Group: Join a study group or find a coding buddy. Explaining your solutions to others and discussing different approaches can significantly improve your understanding.
Remember, mastering DP takes time and consistent practice. Don’t be discouraged if you find it difficult at first. Keep practicing and you’ll get better.
Min - Max - Dynamic Programming: https://leetcode.com/list/rtx67q66
Merge Intervals - Dynamic Programming: https://leetcode.com/list/p6ie4qgm
Decision Making - Dynamic Programming: https://leetcode.com/list/p6ieylq7
Distinct Ways - Dynamic Programming: https://leetcode.com/list/p6iesgz3
Strings - Dynamic Programming: https://leetcode.com/list/p6ie1t61
🔗 Resources for Preparation
📚 Resources that Sparked my Success:
I extend my heartfelt gratitude to the creators of these invaluable resources. Your work has not only assisted me but will undoubtedly guide countless others on their journeys as well.
- https://www.bigocheatsheet.com/
- https://learnsql.com/blog/sql-basics-cheat-sheet/
1. DSA (Data Structures and Algorithms)
Combination of Love Babbar and Striver sheet
( Simply to acquaint yourself. Please don't conclude that solving these entirely signifies completion. These sheets serve as a tool to engage with diverse patterns, problem types within each data structure, and acquaint yourself with various algorithms to achieve optimal solutions.)- bit.ly/3OENkNf (450 Questions)
- bit.ly/3qH8VN4 (191 Questions)DP Programming: When it comes to DP, practice is key. Begin with basic recursion, then build up to DP concepts. It's the way to truly master it!
- bit.ly/3OvnsU8
- bit.ly/3sg2dORBest Leetcode Articles:
- https://bit.ly/3E242kZ
- https://bit.ly/3YK2yFt
- https://bit.ly/3sj6CjI
- https://bit.ly/3OH1QnMThe portals I used for my prep: Leetcode (35%), Coding Ninjas (10%), GeeksForGeeks (35%), Interviewbit (20%)
While navigating this path, I discovered that certain problems were elegantly presented on diverse platforms. Interviewbit emerged as my go-to, consistently to check if I am writing optimal solutions.
Aptitude
Utilized CareerRide and Indiabix for comprehensive preparation. Indiabix mixed sets kept my skills sharp, while CareerRide provided focused aptitude topic-wise practice.
Geeks for Geeks Aptitude section: bit.ly/3qrQ2hk
Coding Ninjas Aptitude section: bit.ly/3DXApRF
Indiabix: https://www.indiabix.com/Core subjects
Computer Networks
- https://bit.ly/45ORHfZ
- https://bit.ly/3DWPzqvDBMS
- https://bit.ly/3qzmX3q
- https://bit.ly/3QF2uVuOS (Operating System)
- https://bit.ly/45wB8VW
- https://bit.ly/45xerk6Handwritten Notes:
- DBMS: https://bit.ly/3QBOsnC
- Networks: https://bit.ly/45whd9r
- OOPS: https://bit.ly/3YE39bN
- OS: https://bit.ly/45bsPyWPuzzles
- geeksforgeeks.org/puzzlesSystem Design
- https://bit.ly/3DWR5sq
- https://bit.ly/3L6lZ5Z
👮♂️ Focus Areas During Technical Interviews
Top companies use a scoring methodology for coding interviews that evaluates candidates on four dimensions: Communication, Problem Solving, Technical Competency, and Testing. Candidates can be scored either by summing up scores for each dimension or based on overall performance across dimensions. The scoring bands are Strong hire, Hire, No hire, and Strong no hire, with some companies having a middle band for indecision.
The final score is based on the overall performance across evaluated criteria. If a candidate doesn’t receive a “pass” equivalent to “Leaning hire” and above in a phone screen round, they would not proceed to the full interview loop. If there were no clear signals obtained from the round, a follow-up phone screen round might be conducted.
Candidates go through every interview round in the full interview loop before a decision is made based on the final package. If a candidate receives mixed results from different rounds, interviewers will convene for a discussion based on the signals displayed. Performance throughout the interview loop is important.
In certain cases, candidates may be invited for additional assessment rounds if there were aspects missed out in the assessment or if the candidate displayed mixed signals in particular areas. Scores and feedback for each round are visible to all interviewers. Interviewers can even see feedback from past interviews at the same company to avoid asking the same question again. Companies want to see growth compared to the past, so reflection and addressing possible reasons for past rejections are important when re-interviewing with the same company.
The evaluation criteria include Communication, where basic signals include asking appropriate clarifying questions, communicating approach, rationale and tradeoffs, constantly communicating even while coding, and well-organized, succinct, clear communication. The overall evaluation is categorized as Strong hire, Leaning hire, and Leaning no hire.
Crafting a perfect resume is crucial for getting interviews at top Bay Area companies. FAANG-quality resume templates and examples have helped many Software Engineers save time and get interviews. Reflecting on past performances and addressing any shortcomings can increase the chances of success in future interviews.
😉 Top Websites for Making Good ATS Friendly Resume
FAANGPath: This is a popular resume template that is ATS compliant, well formatted, and easy to read. It’s also popular on Overleaf.
Jobscan: They offer 15 free ATS resume templates optimized for 2024. These templates can be edited in Microsoft Word and can be accurately scanned by an applicant tracking system.
Resume Genius: They provide five ATS-friendly resume templates that are free to download and specifically designed to beat the applicant tracking system.
Overleaf: They have a 70+ ATS rating resume template.
💪 Must Check:
https://takeuforward.org/strivers-a2z-dsa-course/strivers-a2z-dsa-course-sheet-2/
https://takeuforward.org/interview-sheets/strivers-79-last-moment-dsa-sheet-ace-interviews/
Top 100 Liked Problems: https://leetcode.com/problem-list/top-100-liked-questions/
Top Interview Questions: https://leetcode.com/problem-list/top-interview-questions/