<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Om Ashish Soni on Medium]]></title>
        <description><![CDATA[Stories by Om Ashish Soni on Medium]]></description>
        <link>https://medium.com/@om-ashish-soni?source=rss-992ebb207178------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Ci4iGCbiqZ6Vi-Zf3cqkBA.jpeg</url>
            <title>Stories by Om Ashish Soni on Medium</title>
            <link>https://medium.com/@om-ashish-soni?source=rss-992ebb207178------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 15:24:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@om-ashish-soni/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Ultimate Strategy to Solve Any Coding Problem]]></title>
            <link>https://om-ashish-soni.medium.com/the-ultimate-strategy-to-solve-any-coding-problem-1331cbbba530?source=rss-992ebb207178------2</link>
            <guid isPermaLink="false">https://medium.com/p/1331cbbba530</guid>
            <category><![CDATA[problem-solving]]></category>
            <category><![CDATA[data-structures-algorithm]]></category>
            <category><![CDATA[competitive-coding]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[interview-tips]]></category>
            <dc:creator><![CDATA[Om Ashish Soni]]></dc:creator>
            <pubDate>Sun, 16 Feb 2025 08:53:15 GMT</pubDate>
            <atom:updated>2025-02-16T11:20:14.909Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello everyone, I am <a href="https://www.linkedin.com/in/om-ashish-soni/"><strong><em>Om Ashish Soni</em></strong></a>, Software Engineer at Mastercard, Top Competitive Coder from India, 3x Gold Medalist, 2x Published AI researcher, Gate Topper &amp; Computer Engineer.</p><p><strong>In this Blog, We </strong><a href="https://medium.com/@dishatimbadiya055"><strong>Disha</strong></a><strong> &amp; </strong><a href="https://medium.com/@om-ashish-soni"><strong>Om</strong></a><strong> are going to share the Strategy to Solve Any Coding Problem.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*sdmHhR75nFYhLS9aTa7ZRA.png" /></figure><h3>1. Understanding the Problem</h3><ul><li><strong>Read the problem statement carefully. ( Read problem statement 2x twice , 3x )</strong></li><li>Note down the important words ( tricky words ) from problem statement, for example</li></ul><ol><li>Undirected graph vs Uni-directed graph</li><li>Only lowercase English letters are in input</li><li>Edge words like : it is given that the solution always exists, or return -1 if the solution does not exist.</li><li>Check the data type of input &amp; output (ex: int, long, double)</li><li>Duplicates are allowed &amp; whether numbers can be negative</li><li>For linked lists note the minimum possible size.</li></ol><p>Such points must be covered while reading a problem.</p><p><strong>Example:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/0*npfnJxprQXEhRfCx" /></figure><ul><li>Identify constraints and edge cases.</li></ul><ol><li>array size</li><li>negative numbers</li><li>duplicate elements</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/0*pjfTrcjB-7Qc01C8" /></figure><p><strong>Example:</strong> If the constraint is <strong>1 ≤ N ≤ 1⁰⁴</strong>, a <strong>brute force O(N²) approach is inefficient</strong> and should be optimized.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/0*KGOzXTFs7dKTUeeV" /></figure><blockquote><em>Here 1⁰⁷ is also fine for some problems on O(N)</em></blockquote><ul><li>Ask clarifying questions (in interviews).</li></ul><p><strong>Example:</strong></p><blockquote><em>In Two Sum question:</em></blockquote><ol><li>What if no such numbers exist?</li></ol><p>2. What if multiple pairs exist?</p><blockquote><em>In a </em><strong><em>graph traversal question</em></strong><em> ask:</em></blockquote><ol><li>Is the graph directed or undirected?</li></ol><p>2. Are there cycles?</p><p>3. Is the graph weighted?</p><ul><li>Break the problem into inputs, outputs, and requirements.</li></ul><p><strong>Example:</strong></p><ol><li><strong>Graph traversal question</strong></li></ol><ul><li><strong>Inputs:</strong> Graph (Adjacency List/Matrix), Starting Node, Traversal Type (BFS/DFS).</li><li><strong>Outputs:</strong> List of nodes in traversal order.</li><li><strong>Requirements:</strong> Ensure correctness (BFS → level order, DFS → depth-first), handle cycles, disconnected graphs, and optimize time complexity to O(V + E).</li></ul><ol><li>In a <strong>string reversal problem</strong>, break it down:</li></ol><ul><li><strong>Input:</strong> “hello”</li><li><strong>Output:</strong> “olleh”</li><li><strong>Requirement:</strong> Solve <strong>in-place</strong> without extra space.</li></ul><h3>2. Designing an Approach</h3><ol><li><strong>Identify the problem type (e.g., DP, Graphs, Greedy, etc)<br>Example:</strong></li></ol><ul><li>Find the shortest path in a weighted graph → Dijkstra’s Algorithm.</li><li>Find the longest increasing subsequence → Dynamic Programming (DP).</li></ul><p><strong>2. HAVING A PEN &amp; PAPER &amp; DRY RUN your approach you thought on paper</strong></p><p><strong>3. Consider brute force first, then optimize</strong> because interviewers often want to see how you think and approach a problem If you go straight to the optimized solution they might assume you have seen the problem before and are just repeating the answer Starting with the brute force approach shows that you can break down the problem and improve your solution step by step It helps show your problem solving skills clearly</p><p><strong>Example:</strong> Finding the <strong>maximum pair sum</strong> in an array:</p><ul><li><strong>Brute force:</strong> Check all pairs (<strong>O(N²)</strong>).</li><li><strong>Optimized:</strong> Sort the array and take the two largest elements (<strong>O(N log N)</strong>).</li></ul><p><strong>4. Recognize patterns and similar problems.</strong><br><strong>Example:</strong> If solving a <strong>subarray sum problem</strong>, check if it’s similar to <strong>Kadane’s Algorithm</strong> or <strong>Prefix Sum</strong> problems.</p><p><strong>5. Think about time and space complexity.</strong><br><strong>Example:</strong></p><ul><li><strong>Bubble Sort</strong> takes <strong>O(N²)</strong> → Not ideal for large inputs.</li><li><strong>Merge Sort</strong> takes <strong>O(N log N)</strong> → More efficient.</li></ul><p>6. By seeing constraints we can have idea of approach for example if N is 1⁰⁵ and graph problem of distance, then most likely dijkstra but on the same if N is 100, then floyed warshall.</p><h3>3. Writing a Plan Before Coding</h3><ul><li>Use pseudocode or outline key steps.</li></ul><p><strong>Example: In Two sum problem: duplicate pairs are not allowed</strong></p><ol><li>Remove duplicate numbers from the array.</li><li>Iterate over the array using a nested loop.</li><li>Check if sum = arr[i] + arr[j] : add it to the result (ArrayList).</li><li>No Pairs match : return the empty list.</li></ol><p><strong>OR</strong></p><ol><li>Iterate over the array using a nested loop.</li><li>Check if sum = arr[i] + arr[j] : add it to the result (HashSet).</li><li>No Pairs match : return the empty list</li></ol><ul><li>Consider edge cases and test scenarios before implementation.</li><li><strong>Breaking problem into smaller subproblems</strong></li><li>For example if finding shortest path on grids, then first convert grid into graph, then apply dijkstra on graph.</li><li>Also try to use recursion / divide and conquer, if applicable, solve for part of input and recursively call for smaller subparts.</li></ul><h3>4. Implementing the Solution</h3><ul><li>Write <strong>clean, modular, and readable code</strong>, give meaningful names to variables and functions</li><li>Debug systematically: use print statements to track variable values or use debugger tools</li><li>Optimize only after achieving a working basic solution</li><li>Also add necessary Comments in code.</li><li>Rather than writing from scratch, try to use as much ready made library functions as possible</li><li>We can divide code into chunks like we read the input, sort the array and do some preprocessing and init variables , then add comment before that</li></ul><blockquote><em>// init:</em></blockquote><blockquote><em>…. Your code here</em></blockquote><blockquote><em>// doing xyz</em></blockquote><blockquote><em>….. Some more code here</em></blockquote><blockquote><em>// preparing ans and returning value</em></blockquote><blockquote><em>… some last code here</em></blockquote><ul><li>Create as many functions / methods as possible to make code reusable , like rather than multiple chunks of code , wrap chunk of lines in function and call that function</li><li>Always initialize variable, try to avoid keeping null/ garbage value</li><li><strong>Analyze written code 2x before giving to interviewer / submitting in OA, for avoiding silly mistakes</strong></li></ul><h3>5. Testing the Code</h3><ul><li>Run with <strong>sample and edge test cases</strong>.</li><li>At Least prepare your own 1–2 test case and check for expected output, this will give more understanding of the problem.</li></ul><p><strong>Example: Two sum</strong></p><ol><li><strong>No valid pairs</strong></li><li><strong>Multiple valid pairs</strong></li><li><strong>Single element (n = 1)</strong></li><li><strong>Negative numbers</strong></li><li><strong>Duplicate elements in array</strong></li></ol><ul><li>Debug using <strong>print statements</strong> or a debugging tool.</li><li>Check for <strong>performance bottlenecks</strong> in loops and recursion.</li></ul><h3>6. Optimizing the Solution</h3><ul><li>Analyze <strong>time and space complexity</strong>.</li><li>Look for <strong>data structure optimizations</strong></li></ul><p>Example: instead of using array to store frequency use hashmap.</p><ul><li>Use <strong>memoization</strong> or <strong>pre-computation</strong> techniques when possible.</li></ul><p>Example: prefix sum or use dp to avoid repeated calculation.</p><h3>7. Practicing Effectively</h3><ul><li>Follow a structured roadmap (e.g., <strong>LeetCode, GFG, Codeforces</strong>) : <a href="https://medium.com/@om-ashish-soni/generalized-roadmap-for-dsa-and-competitve-coding-by-om-ashish-soni-09789df3df55">Generalized Roadmap for DSA &amp; CP</a></li><li>Solve problems in <strong>increasing difficulty order</strong>.</li><li>Focus on <strong>weak areas</strong> through topic-wise practice.</li><li>Use <strong>timed mock interviews</strong> to simulate real-world pressure.</li><li>Even before / after you solved problem discuss with peers for better intuition of theirs.</li><li>After solving the problem successfully then also see the tutorial to see more better solution than yours.</li><li>You can practice topic wise on leetcode/ geeksforgeeks, GFG is good alternative for leetcode premium problems.</li><li>Company wise practice problems are there on geeksforgeeks.</li></ul><h3>8. Developing Problem-Solving Intuition</h3><ul><li>Learn from <strong>solutions and discussions</strong>: after solving the question check how other approached it.</li><li>Practice thinking in <strong>multiple ways</strong> before coding.</li></ul><p>Example: two sum</p><ol><li>Sort the array and use arraylist</li><li>Without sorting the array use HashMap to avoid duplicates</li></ol><h3>9. Managing Pressure During Interviews</h3><ul><li>Stay <strong>calm and communicate your thoughts</strong> clearly.</li><li>Speak out loud while coding to explain your approach.</li><li>Handle unknown problems by <strong>breaking them into smaller parts</strong>.</li><li>Remember one point that the interviewer is there to hire you, so at the end if nothing comes to mind, ask for some cases / small hints.</li></ul><h3>10. Recognizing Problem Categories</h3><ul><li>After your problem is solved, recall once again what was the exact topic/ ds / algo which helped you to solve a problem and keep remembering that, this will help for next similar problem in future ( you may also store such problem in excel file / word doc / with code in github repo ).</li></ul><h4>Array &amp; String Problems</h4><ul><li>Use a sliding<strong> window, two pointers, or hashing</strong>.</li></ul><h4>Sorting &amp; Searching</h4><ul><li>Understand <strong>binary search and quicksort/mergesort optimizations</strong>.</li></ul><h4>Recursion &amp; Backtracking</h4><ul><li>Recognize when <strong>recursion is useful</strong> and how to <strong>optimize it</strong>.</li></ul><h4>Dynamic Programming (DP)</h4><ul><li>Identify <strong>overlapping subproblems</strong> and break them down into subproblems.</li></ul><h4>Graphs &amp; Trees</h4><ul><li>Know <strong>BFS, DFS, Dijkstra’s Algorithm, and Tree Traversals</strong>.</li></ul><h4>Bit Manipulation</h4><ul><li>Learn how <strong>bitwise operations</strong> can optimize problems.</li></ul><h3>11. Debugging and Improving Code</h3><ul><li>Use <strong>print statements or debugging tools</strong> for tracing issues.</li><li>Dry run the code <strong>on paper</strong> before executing.</li><li>Test with <strong>extreme cases</strong>, including minimum and maximum constraints.</li><li>Identify common mistakes:</li></ul><p>Example: <strong>wrong base cases in recursion</strong>.</p><h3>12. Time Complexity Trade-offs</h3><ul><li>Use <strong>hash maps &amp; sets</strong> for O(1) lookups instead of O(N) loops.</li><li>Consider <strong>pre-computation techniques</strong> like <strong>prefix sum, difference arrays, or memoization</strong>.</li><li>Optimize using <strong>space vs. time trade-offs</strong> when necessary.</li></ul><h3>13. Handling Tricky Edge Cases</h3><ul><li><strong>Empty input, single-element cases</strong>.</li><li><strong>Large numbers (integer overflow)</strong>.</li><li><strong>Duplicates or negative values</strong>.</li><li><strong>Off-by-one errors</strong> (e.g., 0-based vs. 1-based indexing).</li></ul><h3>14. Learning from Mistakes</h3><ul><li>Maintain a <strong>mistakes sheet </strong>(track where and why you got stuck- <a href="https://vibalijoshi.notion.site/57fed931adb846f888903ecccea61a43?v=4e941c19e4664a2d97eb5d5a78873419"><em>Mistake Documentation Sheet — Notion</em></a>).</li><li>Review <strong>past solutions</strong> and refactor for better readability.</li></ul><p><strong>Connect with us on LinkedIn:</strong></p><ul><li><a href="https://www.linkedin.com/in/dishatimbadiya/">Disha Timbadiya</a></li><li><a href="https://www.linkedin.com/in/om-ashish-soni/">Om Soni</a></li></ul><p>Special Thanks to <a href="https://medium.com/u/3c82b5c64b6">Dishatimbadiya</a> for collaboration.</p><p>Happy coding! 😊</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1331cbbba530" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gate last minute preperation strategy]]></title>
            <link>https://om-ashish-soni.medium.com/gate-last-minute-preperation-strategy-6c32f5603f16?source=rss-992ebb207178------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c32f5603f16</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[gate-exam-preparation]]></category>
            <category><![CDATA[gate-exam]]></category>
            <dc:creator><![CDATA[Om Ashish Soni]]></dc:creator>
            <pubDate>Tue, 28 Jan 2025 02:37:51 GMT</pubDate>
            <atom:updated>2025-01-28T02:39:47.021Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I prepared for gate in 3 days</h3><p>Hey everyone, I am Om Ashish Soni, <strong>AIR 2458 Gate CSE 24, 3x Gold Medalist from Dharmsinh Desai University, Nadiad</strong>.</p><p>Let’s face it—preparing for GATE is no joke. But when you have only 2-3 days left to prepare, things can get intense! Here’s how I managed to structure my last-minute preparation and maximize my performance. Hopefully, it gives you a clear roadmap if you’re in a similar situation.</p><h3><strong>Day 1: Starting with the Core Subjects DSA, DBMS</strong></h3><p>I began with DSA (Data Structures and Algorithms) and DAA (Design and Analysis of Algorithms). My approach was simple:</p><p>I relied entirely on college PPTs.<br>Focused on revising key concepts like sorting, searching, graph algorithms, and dynamic programming.<br>Once I was done with DSA and DAA, I shifted to DBMS (Database Management Systems) and SQL. Again, I stuck to PPTs and ensured I covered all the basics, including normalization, transactions, and query solving.</p><h3>Day 2: Covering OS, Compiler Design, and Theory of Computation</h3><p>On the third day, I took on:</p><p>Operating Systems (OS): Focused on process synchronization, memory management, and scheduling.<br>Compiler Construction &amp; Theory of Automata: Completed these entirely since they’re scoring subjects. I made sure to understand formal languages, parsers, and DFA/NFA conversions.</p><h3>Day 3: Digital Logic and Computer Organization, Discrete maths</h3><p><strong><em>Digital Logic (DLD):</em></strong><em> I almost completed</em> this subject, but left out 1-2 topics due to time constraints.</p><p><strong>Computer Organization (CSA):</strong> I couldn’t cover much here. While I knew some topics from before, I didn’t get time to revise them or practice well.</p><p><strong>Discrete Mathematics</strong><br>This subject was a major win for me—I completed it entirely. Sets, relations, graph theory, logic—these are critical topics and often fetch easy marks if done right.</p><p>Engineering Mathematics &amp; General Aptitude<br>Honestly, I didn’t focus much on Engineering Mathematics. I left out topics like integration, differentiation, and advanced calculus because I just didn’t have the time.<br>For Aptitude, I solved only previous years&#39; questions (PYQs) and reviewed the important concepts.</p><p>PYQs and Mock Tests<br>One of my most valuable strategies was focusing on previous years’ questions (PYQs) and taking mock papers. This helped me identify common question patterns and areas where I was likely to score.</p><p>Resources I Used<br>Gate Smashers: Great for quick revisions!<br>Ravindra Ravula: Good content, but the videos were too long for my tight schedule.<br>College PPTs: These were lifesavers for covering topics quickly.</p><h3>What I Missed</h3><p><strong>Computer Networks</strong>: I revised only a few topics due to lack of time. This cost me marks.</p><p><strong>CSA (Computer System Architecture):</strong> Partial coverage here meant I couldn’t answer confidently.</p><p><strong>Tips for Last-Minute GATE Preparation</strong></p><p><strong>Prioritize Core Subjects</strong>: Subjects like DSA, DAA, DBMS, OS, and Theory of Computation are high-scoring and should be your focus.<br><strong>PYQs are Gold:</strong> Even if you’re short on time, solving previous years’ questions gives you a clear idea of what to expect.<br><strong>Don’t Skip Mocks</strong>: Solving a mock paper helps with time management and builds confidence.</p><p><strong>Revise more and less Learn New</strong>: Stick to revising what you already know—this is not the time to pick up completely new topics.<br>Use Short Resources: Videos and notes that are concise work better than long, detailed lectures.</p><p><strong>Disclaimer:</strong></p><p>Above strategy worked for me, given I am 3x Gold Medalist from Dharmsinh Desai University, along with top in almost all semester, and 10/10 in 3 semesters, so I was able to manage it preparing in 3–4 days, may not apply to all.</p><p><strong>Final Thoughts</strong></p><p>Preparing for GATE in just a few days isn’t ideal, but with the right focus and strategy, you can still perform well. My journey might have had its gaps, but focusing on high-priority topics, solving PYQs, and sticking to short resources made a significant difference.</p><p>To all GATE aspirants reading this—don’t panic, prioritize smartly, and make the most of whatever time you have left. You’ve got this!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c32f5603f16" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Generalized roadmap for DSA and competitve coding by Om Ashish Soni]]></title>
            <link>https://om-ashish-soni.medium.com/generalized-roadmap-for-dsa-and-competitve-coding-by-om-ashish-soni-09789df3df55?source=rss-992ebb207178------2</link>
            <guid isPermaLink="false">https://medium.com/p/09789df3df55</guid>
            <category><![CDATA[placement]]></category>
            <category><![CDATA[problem-solving]]></category>
            <category><![CDATA[data-structure-algorithm]]></category>
            <category><![CDATA[competitive-programming]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Om Ashish Soni]]></dc:creator>
            <pubDate>Wed, 25 Dec 2024 08:23:15 GMT</pubDate>
            <atom:updated>2025-01-18T09:07:58.687Z</atom:updated>
            <content:encoded><![CDATA[<h3>Ultimate Guide to DSA and Competitive Programming by <a href="https://medium.com/u/992ebb207178">Om Ashish Soni</a></h3><p>Hello everyone, I am <a href="https://www.linkedin.com/in/om-ashish-soni/"><strong><em>Om Ashish Soni</em></strong></a>, Software Engineer at Mastercard, Top Competitive Coder from India, 3x Gold Medalist, 2x Published AI researcher, Gate Topper &amp; Computer Engineer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*Z3tuDKSSh9VgsmfTUg487w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*INSkHsijaYP2vvmbCndgew.png" /></figure><p>We will go step by step journey for competitive programming and Data Structures and Algorithms</p><h3>Phase 0 : Why Competitive Coding &amp; DSA</h3><ul><li>MNCs and Medium size companies takes coding round &amp; technical rounds in interview there they ask for data structures and algorithms problems.</li><li>Lot of real world problems can be solved very easily by using dsa.</li><li><strong>This boosts your critical thinking, cognitive thinking, debugging and implementation skills, which helps infinitely as a future Software Engineer.</strong></li></ul><p><strong>CP vs DSA :</strong></p><ul><li>DSA is helpful for placement, Competitive Coding is super set of DSA.</li><li>Competitive Coding is more like a game, brain sport, where people compete using human brain to solve any problem. DSA is more or less structured way of preparing for tech interviews.</li><li>Competitive Coding changes the fundamental way of thinking and tackling real world problems of life.</li></ul><p><strong>Personal Opinion :</strong></p><ul><li>If I was in my 1st / 2nd / 3rd year of college, I would start CP &amp; DSA from today itself.</li><li><strong>It’s never late to start.</strong></li></ul><h3><strong>Phase 1 : Pick one programming language</strong></h3><ul><li>C++ , Java, Python ( pypy3 )</li><li>Learn the basics of language from youtube, geeksforgeeks, w3schools<br>Learn about data types, operators, function, syntax, etc.</li></ul><h3><strong>Phase 2 : Start Basic Problem Solving on Hackerrank :</strong></h3><p>Start solving picked language problems on hackerrank <strong><em>( Any 1 language )</em></strong>:</p><p>1. <a href="https://www.hackerrank.com/domains/c">Solve C Hackerrank</a></p><p>2. <a href="https://www.hackerrank.com/domains/cpp">Solve C++ Hackerrank</a></p><p>3. <a href="https://www.hackerrank.com/domains/java">Solve Java Hackerrank</a></p><p>4. <a href="https://www.hackerrank.com/domains/python">Solve Python Hackerrank</a></p><ul><li>Once you do any one of the above, you will have some grip on problem solving and language specific.</li><li>If you are not able to solve any problem, don’t giveup try the compile time and run time errors solution looking on google, stack overflow, geeks for geeks etc.</li><li>Atleast try for 10–20 times before looking at solution.</li></ul><p><strong>Start your problem solving with pattern printing problems</strong></p><ul><li>You by do pattern printing in any language, that helps building logic.</li><li><a href="https://www.youtube.com/watch?v=tNm_NNSB3_w">Pattern Printing Tutorial by Striver</a></li></ul><p><strong>Practice :</strong></p><ul><li><a href="https://takeuforward.org/strivers-a2z-dsa-course/must-do-pattern-problems-before-starting-dsa/">Pattern Printing Problems Take U Forward</a></li></ul><h3>Phase 3 : General Resources to learn any topic</h3><p>Before we jump on learning various data structures and algorithms these are few general resources you may refer for any topic.</p><h3>YouTube Resources :</h3><ul><li><a href="https://www.youtube.com/@striver_79"><strong>Striver youtube</strong></a></li><li><a href="https://www.youtube.com/@takeUforward"><strong>Take U Forward Youtube</strong></a></li><li><a href="https://www.youtube.com/playlist?list=PLfqMhTWNBTe0b2nM6JHVCnAkhQRGiZMSJ"><strong>Apna College C++ Placement Course</strong></a> ( for basic to advanced )</li><li><a href="https://www.youtube.com/channel/UCDzhFuVYou1D8w1ABZo3b9A"><strong>LUV Youtube Channel</strong></a> [ good for c++ ]</li><li><a href="https://www.youtube.com/@mycodeschool"><strong>My Code School</strong></a></li><li><a href="https://www.youtube.com/@tusharroy2525"><strong>Tushar Roy</strong></a> ( for algorithms )</li><li><a href="https://www.youtube.com/@techdose4u"><strong>Tech dose</strong></a> ( for data structures and algorithms)</li><li><a href="https://www.youtube.com/@vivekgupta3484"><strong>Vivek Gupta</strong></a> ( for competitive programming and some advanced topics )</li></ul><h3>Web Resources :</h3><p>below is super helpful blog containing topic list</p><ul><li><a href="https://www.geeksforgeeks.org/competitive-programming-a-complete-guide/"><strong>Best blog for dsa and competitive coding topics &amp; guide GeeksForGeeks</strong></a></li><li><a href="https://cp-algorithms.com/index.html"><strong>CP Algorithms</strong></a></li><li><a href="https://codeforces.com/blog/entry/91363"><strong>Codeforces Blogs</strong></a></li><li><a href="https://github.com/om-ashish-soni/Competitive-Programming"><strong>Om Ashish Soni Competitive Programming Github Repo</strong></a></li><li><strong>Whatever data structures , algorithms you learn implement them and store in your own github repo</strong></li></ul><h3><strong>Phase 4 : Learning Array &amp; String</strong></h3><ul><li>Start learning array, string in your chosen language from youtube, geeksforgeeks, etc.</li><li>Practice them on Hackerrank.</li><li>If you feel comfortable then start solving array and string easy problems on leetcode.com / geeksforgeeks.org</li></ul><p><strong>Practice :</strong></p><ul><li><a href="https://leetcode.com/problem-list/array/">Array Practice on Leetcode</a></li><li><a href="https://leetcode.com/problem-list/string/">String Practice on Leetcode</a></li></ul><h3>Phase 5 : Where and How to practice the problems</h3><p>Before you do some more practice it is important to know what is best way and best practices to solve and practice problems.</p><h3><strong>Practice Platforms</strong></h3><ul><li><a href="https://leetcode.com/problemset/"><strong>LeetCode Problemset</strong></a></li><li><a href="https://cses.fi/problemset/"><strong>CSES Problemset</strong></a></li><li><a href="https://codeforces.com/problemset"><strong>Codeforces Problemset</strong></a></li><li><a href="https://takeuforward.org/interviews/strivers-sde-sheet-top-coding-interview-problems/"><strong>Striver SDE Sheet Problemset</strong></a><strong> [ Highly Recommended for Interviews ]</strong></li><li><a href="https://www.geeksforgeeks.org/explore?page=1&amp;sprint=a663236c31453b969852f9ea22507634&amp;sortBy=submissions&amp;sprint_name=SDE%20Sheet&amp;itm_medium=main_header&amp;itm_campaign=practice_header"><strong>Geeksforgeeks Problems</strong></a><strong> [ Alternative for LeetCode Premium ]</strong></li><li><a href="https://takeuforward.org/strivers-a2z-dsa-course/strivers-a2z-dsa-course-sheet-2"><strong>Striver A2Z Sheet [ Recommended for interviews ]</strong></a></li><li><a href="https://github.com/om-ashish-soni/Competitive-Programming/tree/master/problemset/topic_wise_problems"><strong>Topic Wise Problems by Om Ashish Soni</strong></a></li><li><a href="https://github.com/om-ashish-soni/Competitive-Programming/tree/master/problemset/data_structure_problems"><strong>Data Structure Wise Problems By Om Ashish Soni</strong></a></li></ul><h4><strong>How to practice on leetcode or any other platforms</strong></h4><ul><li>Filter problems like below highlighted from easy to medium to hard,</li><li>Solve easy first gradually moving to medium, keep hard for some later time.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZivKctbePDWsJwyU5DPFHQ.png" /></figure><ul><li>Visit to leetcode.com, select a specific topic and start solving easy problems on it.</li><li>The more number of accepted solutions means the more easy problem is.</li></ul><p><strong>Topic-Wise Practice</strong>:</p><ul><li>Focused practice on a specific topic ensures you master the underlying concepts and techniques.</li><li>It helps build confidence and prepares you to handle problems of that particular type with ease.</li></ul><p><strong>Random Problem-Solving</strong>:</p><ul><li>Solving random problems simulates real competition scenarios where you don’t know the topic beforehand.</li><li>It trains you to identify the relevant topic and approach for solving the problem.</li><li>This practice improves adaptability, problem-recognition skills, and overall versatility as a programmer.</li></ul><h3>Advice to solve problem effectively:</h3><ol><li>Have pen and paper,</li></ol><p>2. Read problem twice</p><p>3. Read constraints twice</p><p>4. List all approaches you can think of</p><p>5. Dry run all tests cases with your hand on paper</p><p>6. Now whatever you did see how can you code for it</p><p>7. Atleast try for 1–2 hours before giving up</p><p>8. Still can’t get it, try to see the topics</p><p>9. Still can’t get it, try to see hint 1,2,…</p><p>10. Still can’t get it, try to read blogs of other people’s solution, read approach and code if needed</p><p>11. Still can’t get it, then watch video</p><p>12. After you solve with editorials then observe what you missed</p><h3>Phase 6 : Learning Math, Number Theory , Bit Manipulations</h3><ul><li><strong>Math, Number Theory</strong> are all school level topics, for example primality, factorization, odd — even number, GCD, LCM etc.</li><li><strong>Bit manipulation</strong> may be something new, may need to learn. Each number in the machine will be represented at the end using 0s and 1s, these are the problems based on bits. Binary Operations like bitwise AND, OR, NOT, XOR etc.</li></ul><p><strong>Resources :</strong></p><ul><li><a href="https://www.youtube.com/watch?v=tDM6lT-qjys">Maths for CP &amp; DSA by Utkarsh Gupta</a></li><li><a href="https://www.youtube.com/watch?v=LbRfPQwBEXQ">Maths by LUV</a></li><li><a href="https://www.youtube.com/watch?v=5rtVTYAk9KQ">Bit Manipulation by Striver</a></li><li><a href="https://www.hackerearth.com/practice/math/number-theory/basic-number-theory-1/tutorial/">Hackerearth Number Theory Blog</a></li></ul><p><strong>Practice Problems :</strong></p><ul><li><a href="https://leetcode.com/problem-list/number-theory/">Number Theory Problems Leetcode</a></li><li><a href="https://cses.fi/problemset/">Mathematics problems on CSES sheet</a></li><li><a href="https://github.com/om-ashish-soni/Competitive-Programming/tree/master/problemset/topic_wise_problems/math">Math problems by Om Ashish Soni</a></li><li><strong>Practice problems on above topics on leetcode, gfg, codeforces</strong></li><li>Codechef and Hackerearth are specifically good for math and bit manip problems.</li><li>In c++ there is important concept called as bitset&lt;&gt;</li></ul><h4>Sieve of eratosthenes Primality :</h4><ul><li><a href="https://youtu.be/pKvGYOnO9Ao?si=b0-aNomZkVCC75Nh">Sieve of eratosthenes primality by Tech Dose</a></li></ul><h3>Phase 7 : Learn Time &amp; Space Complexity</h3><ul><li>Time Complexity ( TC ) &amp; Space Complexity ( SC ) are not the topics, but they are important in order to understand</li><li><strong>Time complexity</strong> gives an idea of execution time independent of language.</li><li><strong>Space complexity</strong> gives an idea of space used execution of program independent of language.</li><li>Learn <strong>master’s theorem </strong>to prove / find time complexity.</li><li>Learn what is recursion stack and how it uses space in recursive programs.</li></ul><p><strong>Resources :</strong></p><ul><li><a href="https://www.youtube.com/watch?v=M0tgJaQAo60">Time Complexity Tutorial by LUV</a></li><li><a href="https://www.youtube.com/watch?v=FPu9Uld7W-E">Time Complexity by Striver</a></li><li><a href="https://www.geeksforgeeks.org/time-complexity-and-space-complexity/">Time and Space Complexity Blog on GeeksForGeeks</a></li><li><strong><em>Try to dig for time and space complexity for the problems you solve.</em></strong></li></ul><h3>Basic Constraints and Safe Time Complexity</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*HySoswSO83pLgHlMPPmfHg.png" /></figure><h3>Phase 8 : Learn Searching &amp; Sorting :</h3><h3><strong>Linear search</strong></h3><ul><li><a href="https://www.geeksforgeeks.org/linear-search/">Linear Search geeksforgeeks</a></li></ul><h3><strong>Sorting</strong></h3><ol><li><a href="https://www.youtube.com/watch?v=HGk_ypEuS24"><strong><em>Selection Sort</em></strong></a></li><li>Bubble Sort [ optional — nice to learn]</li><li>Insertion Sort</li><li><a href="https://www.youtube.com/watch?v=ogjf7ORKfd8"><strong><em>Merge Sort</em></strong></a> ( Requires Recusion to implement )</li><li>Quick Sort</li><li>Heap Sort ( optional — may keep this for later )</li></ol><ul><li><strong>In built sorting algorithms in languages i.e. cpp, java, python</strong></li></ul><p><strong>Resources</strong></p><ul><li><a href="https://www.geeksforgeeks.org/sorting-algorithms/">Sorting Algorithms by GeeksForGeeks</a></li></ul><p><strong>Practice Problems</strong></p><ul><li><a href="https://cses.fi/problemset/">Searching and Sorting CSES</a> [ pick only sorting problems ]</li><li><a href="https://leetcode.com/problem-list/sorting/">Sorting problems on Leetcode</a></li></ul><p><strong>Tips</strong></p><ul><li>Don’t rush for learning all sorting algorithms, but try to understand them</li><li><strong>Try to use inbuilt sorting most of the time when you are solving problem.</strong></li></ul><h3><strong>Binary Search</strong></h3><ul><li>Note : Binary Search can only be applied on Sorted Array / Data Structures. [ function needs to be monotonic in order to apply Binary Search ]</li></ul><p><strong>Resources :</strong></p><ul><li><a href="https://www.geeksforgeeks.org/binary-search/">Binary Search GeeksForGeeks</a></li><li><a href="https://youtube.com/playlist?list=PLgUwDviBIf0pMFMWuuvDNMAkoQFi-h0ZF&amp;si=QVW112o1CW2flEDr">Binary Search Basic to Advanced Boot Camp by Striver</a></li><li><a href="https://takeuforward.org/data-structure/binary-search-explained/">Binary Search By Take U Forward / Striver</a></li><li><a href="https://youtu.be/GU7DpgHINWQ?si=oEmZ4b0VYfw9aPUK">Binary Search by Errichto</a></li><li>Some other resources by default in any topic is <a href="https://youtube.com/playlist?list=PLfqMhTWNBTe0b2nM6JHVCnAkhQRGiZMSJ&amp;si=XcYUenlz456kUBi0"><strong>apna college c++ playlist</strong></a>, <a href="https://www.youtube.com/channel/UCDzhFuVYou1D8w1ABZo3b9A"><strong>luv</strong></a>, <a href="https://www.youtube.com/@striver_79"><strong>striver </strong></a>, <a href="https://www.youtube.com/channel/UCJskGeByzRRSvmOyZOz61ig"><strong>take u forward</strong></a> on youtube.</li><li>You may just search on youtube for a topic.</li></ul><p><strong>Other Variations on Binary Search :</strong></p><ul><li><a href="https://www.youtube.com/watch?v=Kb3KOTQfjew">Binary Search on Answer by Striver</a></li><li><a href="https://www.geeksforgeeks.org/binary-search-on-answer-tutorial-with-problems/">Binary Search on Answer Tutorial GeeksForGeeks</a></li></ul><p><strong>Practice Problems :</strong></p><ul><li><a href="https://cses.fi/problemset/">Searching and Sorting CSES</a> [ pick only searching problems ]</li><li>Solve problems on searching and sorting</li></ul><h3>Tip : How to Read a Problem?</h3><ol><li><strong>Pay Attention to Problem Statement:</strong> Take extra care to read the problem statement correctly. Mistakes in understanding the problem can lead to wrong solutions. For example, distinguishing between “undirectional” and “unidirectional” graphs (undirected vs directed) can significantly impact the approach.</li><li><strong>Analyze the Constraints:</strong> Understanding the problem constraints can provide valuable insights into choosing the appropriate algorithms and data structures to solve the problem effectively.</li></ol><h3><strong>Phase 9 : Learning Linear Data Structures</strong></h3><p>Learn linkedlist, stack and queue</p><p><strong>Linked List</strong></p><ul><li><a href="https://takeuforward.org/linked-list/linked-list-introduction">https://takeuforward.org/linked-list/linked-list-introduction</a></li><li><a href="https://youtu.be/Crqgl10aIGQ?si=APdqunULHGxtYFjD">Linkedlist Tutorial Apna College</a></li><li><a href="https://leetcode.com/problem-list/linked-list/">Leetcode Linkedlist Problems</a></li></ul><p><strong>Stack</strong></p><ul><li><a href="https://www.geeksforgeeks.org/stack-data-structure/">Stack blog Geeks for Geeks</a></li><li><a href="https://leetcode.com/problem-list/stack/">Leetcode Stack Problems</a></li></ul><p><strong>Queue</strong></p><ul><li><a href="https://www.geeksforgeeks.org/queue-data-structure/">Queue blog Geeks for Geeks</a></li><li><a href="https://leetcode.com/problem-list/queue/">Leetcode Queue Problems</a></li></ul><h3><strong>Important Note for data structures :</strong></h3><ul><li><a href="https://youtube.com/playlist?list=PLauivoElc3gh3RCiQA82MDI-gJfXQQVnn&amp;si=1PWMfdQ2CpvtA0cG">STL Library implementation of data structures</a> C++</li><li>All data structures are readily available like vectors ( array ) , stack, queue, list , linkedlist, priority queue in all languages.</li><li>So learn and implment only for learning purpose</li><li>while problem solving use ready made data strucutres</li><li>For example libraries like C++ STL , Java Collections, and same for python.</li></ul><h3>How to Learn any topic :</h3><ul><li>Search your topic name on google, i.e. stack on geeksforgeeks</li><li>Read and understand the implementation code of stack from geeksforgeeks</li><li>Try to implement it on your own without copying.</li><li>Test your code by solving some problem related to this topic on leetcode / geeksfogeeks.</li></ul><h3><strong>Inbuilt data structures and algorithms :</strong></h3><ul><li>Learn Standard Template Library in C++, or in java Collections, or similarly for python.</li><li><a href="https://www.youtube.com/playlist?list=PLauivoElc3gh3RCiQA82MDI-gJfXQQVnn">C++ STL Tutorial</a>, <a href="https://youtu.be/rzA7UJ-hQn4?si=IPnb8EQL3pcXj42S">Java Collections Tutorial</a></li><li>Learn about Vector, Map, Set.</li><li>For running and writing programs you may use IDE like <strong>VS Code</strong>, <strong>Sublime Text</strong>, or any <strong>online ide </strong>like<strong> Jdoodle</strong>.</li></ul><h3>Phase 10: Start solving Greedy Problems</h3><p><strong>Greedy</strong></p><ul><li>This is not an algorithm, it is strategy.</li><li>Greedy is human way of thinking in order to reachout the solution.</li><li>problem types includes, searching , sorting etc. any greedy strategy to reachout solution.</li><li>Actually Sorting and Searching are at the end Greedy only.</li><li><a href="https://youtu.be/DIX2p7vb9co?si=G-JMD9xDzaQlQEb4">Greedy Tutorial Striver</a></li><li><a href="https://leetcode.com/problem-list/greedy/">Leetcode Greedy Problems</a></li><li><a href="https://github.com/om-ashish-soni/Competitive-Programming/tree/master/problemset/topic_wise_problems/greedy">Greedy Problems by Om Ashish Soni</a></li></ul><p><strong>Sliding Window</strong></p><ul><li>This linear greedy problem solving technique by maintaining window over array ( linear data structure ) and solving optimization problems.</li><li><a href="https://www.geeksforgeeks.org/window-sliding-technique/">Geeks for Geeks Sliding Window</a></li><li><a href="https://leetcode.com/problem-list/sliding-window/">Leetcode Sliding Window Practice</a></li><li><a href="https://www.youtube.com/playlist?list=PLgUwDviBIf0q7vrFA_HEWcqRqMpCXzYAL">Two pointers &amp; Sliding window Striver</a></li><li><a href="https://github.com/om-ashish-soni/Competitive-Programming/tree/master/problemset/topic_wise_problems/sliding%20window">Sliding window problems by Om Ashish Soni</a></li></ul><p><strong>Two Pointer</strong></p><ul><li>Technique of maintaining 2 pointers ( left and right ) it is more general version of sliding window, and more powerful then sliding window.</li><li><a href="https://youtu.be/BCLfxQja9dI?si=WzAI9OCdHrHmDn1p">Apna College Two Pointer Tutorial</a></li><li><a href="https://www.geeksforgeeks.org/two-pointers-technique/">Geeskforgeeks Two Pointer</a></li><li><a href="https://cses.fi/problemset/list/">CSES Searching and Sorting Section</a></li><li><a href="https://github.com/om-ashish-soni/Competitive-Programming/tree/master/problemset/topic_wise_problems/two_pointer">Two Pointer Problems by Om Ashish Soni</a></li></ul><h3>Phase 9: Learn Recursion</h3><p>Recursion is calling function by itself, is the great stregth to solve difficult problems easily</p><ul><li><a href="https://www.youtube.com/live/7e9PfPEyT04?si=0OLw2PcE3PPghuh7">Recursion by Sanket Singh Part -1, 2 and 3</a></li><li>G<a href="https://www.geeksforgeeks.org/introduction-to-recursion-2/">eeks for Geeks recursion</a></li></ul><p><strong>Practice Problems :</strong></p><ul><li><a href="https://leetcode.com/problem-list/recursion/">Leetcode Recursion Problems</a></li></ul><p><strong>learn divide and conquer technique in that recursion is heavily used there.</strong></p><ul><li><a href="https://www.youtube.com/live/7e9PfPEyT04?si=0OLw2PcE3PPghuh7">Divide and Conquer Geeks For Geeks</a></li><li><a href="https://leetcode.com/problem-list/divide-and-conquer/">Leetcode Divide and Conquer Problems</a></li></ul><h3>Backtracking :</h3><ul><li>Backtracking is bruteforce way to solve a problem using recursion, but backtracking limits recursion tree.</li><li><a href="https://www.geeksforgeeks.org/backtracking-algorithms/">https://www.geeksforgeeks.org/backtracking-algorithms/</a></li><li><a href="https://leetcode.com/problem-list/backtracking/">https://leetcode.com/problem-list/backtracking/</a></li><li>Practice problems on leetcode and geeksforgeeks</li></ul><h3>Phase 10: Contests and Competitions</h3><p><strong>Contest is competition of competitive programming</strong></p><ol><li><a href="https://codeforces.com/contests"><strong>codeforces</strong></a></li><li><a href="https://leetcode.com/contest/"><strong>leetcode</strong></a></li><li><a href="https://www.geeksforgeeks.org/events/rec/gfg-weekly-coding-contest"><strong>geeksforgeeks</strong></a></li><li><a href="https://www.codechef.com/contests"><strong>codechef</strong></a></li><li><a href="https://atcoder.jp/contests/"><strong>Atcoder</strong></a></li></ol><p><strong>They hosts regularly contests on weekly/ biweekly/ monthly basis</strong></p><ul><li><strong>Calendar for contests : </strong><a href="https://clist.by/"><strong>https://clist.by/</strong></a><br>If you perform better your rating will increase and vice versa</li><li><strong>These platforms ratings matters sometimes in your interview, offcampus and oncampus shortlisting for placements.</strong></li><li>Contests gives you expirence on time pressure.</li></ul><p><strong>Recommended contests :</strong></p><ol><li>Leecode weekly and biweekly ( for placement &amp; competitive coding )</li><li>Codeforces div 2,3,4 ( for competitive coder folks )</li><li>Atcoder beginner Contests ( for beginners and intermediates )</li><li>Geeksforgeeks weekend contest ( Just to keep momentum )</li></ol><ul><li>Apart from above there are some other like <strong>Meta Hackercup.</strong></li></ul><p><strong><em>So what you are waiting for just start competing.</em></strong></p><h3>Phase 11 : Hashing</h3><ul><li>Hashing is a technique and a data structure which is used to store key value pair.</li><li>HashMap&lt;&gt; in java, unordered_map in C++, dict in python, object in js.</li><li><a href="https://youtu.be/KEs5UyBJ39g?si=zqwQiB0WpnfnAE3a">Hashing by Striver</a></li><li><a href="https://youtu.be/0kfM_YEzR94?si=eZ2QCnjPvCfCBBu5">Apna College Hashing Tutorial 1</a>, <a href="https://youtu.be/oJx-w2CB8d4?si=YYSulm3ZNiptQIZt">Hashing in C++ STL</a></li><li><a href="https://www.geeksforgeeks.org/introduction-to-hashing-2/">What is Hashing Geeks For Geeks</a></li><li><a href="https://www.geeksforgeeks.org/hashing-data-structure/">Hashing all resources Geeks For Geeks</a></li></ul><p>Practice Problems :</p><ul><li><a href="https://leetcode.com/problem-list/hash-table/">Leetcode hash table practice</a></li><li><a href="https://github.com/om-ashish-soni/Competitive-Programming/tree/master/problemset/topic_wise_problems/hashing">Hashing problems by Om Ashish Soni</a></li></ul><h3>Phase 12 : Tree</h3><p>Usually Tree is extension of linkedlist / vector</p><ul><li><strong>Tree data structure</strong> is a hierarchical structure that is used to represent and organize data in the form of parent child relationship.</li><li><a href="https://www.geeksforgeeks.org/introduction-to-tree-data-structure/">Geeks For Geeks Tree Blog</a></li><li><a href="https://www.youtube.com/watch?v=_ANrF3FJm7I">Striver Tree Series</a></li><li><a href="https://www.geeksforgeeks.org/tree-data-structure/">All topics of Trees Geeks For Geeks</a></li></ul><p><strong>Trees : </strong><br><strong>1. Binary Tree</strong></p><ul><li>Each node in tree has left &amp;/ right children.</li><li>tree traversal , preorder, inorder and postorder</li><li>recursively solving tree problems</li><li>concepts like what is subtree, leaf, root and all.</li><li>Solve tree problems on leetcode and geeksforgeeks</li></ul><p>Practice Problems :</p><ul><li><a href="https://leetcode.com/problem-list/binary-tree/">Leetcode Binary Tree Problems</a></li></ul><p><strong>2. Binary Search Tree</strong></p><ul><li>Binary Search Tree is Binary Tree in the order of values of nodes.</li><li>Inorder traversal gives you sorted values.</li><li>Binary Search idea comes from here only.</li></ul><p>Practice Problems :</p><ul><li><a href="https://leetcode.com/problem-list/binary-search-tree/">Leetcode Binary Search Tree Problems</a></li></ul><p><a href="http://Tree Algorithms"><strong>CSES Tree Algorithms Problems</strong></a></p><p><a href="https://github.com/om-ashish-soni/Competitive-Programming/tree/master/problemset/data_structure_problems/tree"><strong>Tree Problems by Om Ashish Soni</strong></a></p><p>Solve above topics on leetcode, geeksforgeeks, ( codeforces — for competitive coders )</p><p>There are also other type of trees like rooted ( n-ary ) , un-rooted ( n-ary ) tree.</p><h3>Phase 13 : Heap, Priority Queue, Dijsoint Set</h3><p><strong>Heap and Priority Queue ( Priority Queue is implemented using heap )</strong></p><ul><li>Heap is a tree data structure along with the additional propery of ordering by value of nodes.</li><li>max and min heap are major types of heap</li><li><a href="https://youtu.be/MCuERE9Ewbo?si=CCWuMK4CsuA-L_4j">Heap tutorial by Apna College</a></li><li><a href="https://www.geeksforgeeks.org/heap-data-structure/">GeeksForGeeks heap data structure</a></li><li><a href="https://www.geeksforgeeks.org/priority-queue-in-cpp-stl/">Priority Queue in C++ STL</a></li></ul><p>Practice Problems :</p><ul><li><a href="https://leetcode.com/problem-list/heap-priority-queue/">Leetcode Heap problems</a></li><li><a href="https://github.com/om-ashish-soni/Competitive-Programming/tree/master/problemset/data_structure_problems/heap">Heap Practice Problems by Om Ashish Soni</a></li></ul><p><strong>Dijsoint Set Union ( DSU ) :</strong></p><ul><li><a href="https://www.youtube.com/watch?v=eTaWFhPXPz4">DSU by Tech dose</a></li><li><a href="https://leetcode.com/discuss/general-discussion/1072418/Disjoint-Set-Union-(DSU)Union-Find-A-Complete-Guide">Disjont Set Leetcode Blog</a></li><li><a href="https://cp-algorithms.com/data_structures/disjoint_set_union.html">CP Algorithms Disjoint Set</a></li><li><a href="https://takeuforward.org/data-structure/disjoint-set-union-by-rank-union-by-size-path-compression-g-46/">Take U Forward Disjoint Set</a></li></ul><p>Pracitce Problems :</p><ul><li><a href="https://github.com/om-ashish-soni/Competitive-Programming/tree/master/problemset/topic_wise_problems/disjoint_set_union">DSU Practice Problems by Om Ashish Soni</a></li></ul><h3>Phase 14 : Graph</h3><ul><li>Graph is more general form of Tree / Linkedlist.</li><li>Graph is group of connected nodes ( vertices ) together with links.</li></ul><p>Resources:</p><ul><li><a href="https://youtu.be/eGc5TQpBMjA?si=penT8IArjraKRdPJ">Graph tutorial by Apna College</a></li><li><a href="https://youtube.com/playlist?list=PLgUwDviBIf0oE3gA41TKO2H5bHpPd7fzn&amp;si=-cE0-_xJCXqrWJAg">Striver Graph Series</a></li></ul><p>Graph Topics :</p><ul><li>Node, Edge, Cycle, Loop, Path, in graph.</li><li>Directed, Undirected, Asyclic Graph,</li><li>Memory representation ( data structure ) of graph</li></ul><p>1. Adjacency Matrix</p><p>2. Adjacency List</p><ul><li>Graph traversal ( Bredth First Search ( BFS ) , Depth First Search ( DFS ) )</li><li>DFS is most useful</li><li>Single Source Shortest Path ( Dijsktra , Bellman Ford )</li><li>All Shortest Path ( Floyd Warshall )</li><li>Minimum spanning tree in graph ( Prims, Kruskal Algorithm )</li><li>Prims, kruskal, connected componenets of graph</li><li>kosaraju algo, articulation points of graph ( tarjans algorithm )</li><li>priority queue and dijsoint set union if you can learn will help more to solve these graph algo problems</li></ul><p>Practice Problems :</p><ul><li><a href="https://leetcode.com/problem-list/graph/">Leetcode Graph problems</a></li><li><a href="https://github.com/om-ashish-soni/Competitive-Programming/tree/master/problemset/data_structure_problems/graph">Graph problems by Om Ashish Soni</a></li></ul><h3>Phase 15 : Dynamic Programming</h3><p>Ooooppps ! the most obsessfull topic you may think</p><p>Actually its very easy to solve and implement if you know it and hands on it.</p><p><strong>If you don’t remember the past, you are condemned to repeat it.</strong></p><ul><li>Overlapping subproblems property</li><li>We decompose the problem in smaller subproblems and then we solve sub problems and reusing already stored solution.</li><li>DP problems are optimization problems like minimizing, maximizing,</li><li>DP is also used with combinatorics which we will see later.</li><li>DP can be combined with any topic, binary search, string, graph, tree any thing.</li></ul><p><strong>There are 2 types of DP :</strong></p><ol><li><strong>Tabulation ( Iterative — Tabular ) </strong>— Easy to solve and implement in longer time, more widely used</li><li><strong>Memoization ( Recursive ) </strong>— Good to start with</li></ol><p><strong>Great start for dp ( don’t focus on language of video , focus on topic )</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FoBt53YbR9Kk%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DoBt53YbR9Kk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FoBt53YbR9Kk%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0e7e0b8ee59f5c4a068b252974ba9490/href">https://medium.com/media/0e7e0b8ee59f5c4a068b252974ba9490/href</a></iframe><h3><strong>Combinatorics :</strong></h3><ul><li>We already would have covered this in math section, but if it is pending</li><li>You may start thinking to do combinatorics now</li><li>Since sometimes combinatorics implementation requires dp.</li><li><a href="https://leetcode.com/problem-list/combinatorics/">https://leetcode.com/problem-list/combinatorics/</a></li><li>Leetcode, Codechef, Codeforces, GFG are good for combinatorics.</li><li><a href="https://www.youtube.com/watch?v=M5PbeUrOsDw">https://www.youtube.com/watch?v=M5PbeUrOsDw</a></li></ul><h3>Phase 16 : And more advanced topics and data structures algorithm</h3><p><a href="https://www.geeksforgeeks.org/competitive-programming-a-complete-guide/">Competitive Programming - A Complete Guide - GeeksforGeeks</a></p><ul><li>Whole list of topic above</li><li>Keep learning other advanced techniques and ds</li><li>Trie, PBDS ( Policy Based Data structures )</li><li>like segment tree, fenwick tree, policy based data structures</li><li>Keep giving contests</li><li>Keep upsolving problems.</li><li>See all topics here :</li><li><a href="https://github.com/om-ashish-soni/Competitive-Programming/tree/master/problemset/topic_wise_problems">https://github.com/om-ashish-soni/Competitive-Programming/tree/master/problemset/topic_wise_problems</a></li></ul><h3>Tips for DSA &amp; Interview</h3><ol><li><strong>Maintain sheet / word doc of solved problems :</strong> of all problems you solve, maintaing topic name, problem link, and 1–2 lines of breif approach to solve that problem, this will help you to revise quickly before interview. <a href="https://docs.google.com/spreadsheets/d/1BKPC8PTnAUOPLnV6JZypAjwMWUyohklFdgZkhUCGIeQ/edit?usp=sharing">Problems sheet maintained by Me</a></li><li><strong>Some good practices like meaningful name and variables</strong></li><li><strong>Trying one problem with more than 1 approach</strong></li></ol><h3>Tips for contests and competitive programming</h3><ol><li><strong>Stuck in a Contest</strong>: If you feel stuck during a contest, take a short break of 1 or 2 minutes. Wash your face to refresh yourself and then start again with a clear mind.</li><li><strong>Can&#39;t Improve</strong>: If you&#39;re struggling to improve, try upsolving. If you can&#39;t come up with any ideas, refer to the editorial. If there is an unfamiliar topic, learn it and repeat this process.</li><li><strong>How to Boost Performance</strong>: Participating in long challenges on Codechef can help boost your performance and allow you to learn various tips and techniques.</li><li><strong>Combining Different Approaches to Solve Problems: </strong>When faced with a problem, try multiple approaches. For example, if it&#39;s a graph problem, start with DFS. If that&#39;s not enough, try using disjoint sets. If there&#39;s a need for path compression, use it. If the constraints allow, consider using Fenwick trees. This approach helps you combine different techniques to solve problems effectively.</li><li><strong>Difficulty with Last 3 to 4 Problems of a Contest:</strong> If your basics are clear, practice a lot of problems related to trees, graphs, dynamic programming, and segment trees until you feel satisfied.</li><li><strong>Where and How to Practice:</strong></li></ol><ul><li>Hackerrank is a good platform for beginners to learn a programming language.</li><li>Once you have a basic grip on a language, move to the problem set on Codeforces.</li><li>Solve problems on Codeforces with ratings below 1000.</li><li>Practice problems based on specific topics from the Codeforces problem set.</li><li>Participate in contests on Codeforces and Codechef.</li><li>Upsolve problems. If you can&#39;t solve a problem within 30 minutes, refer to the editorial. Learn any unfamiliar topics and repeat this process.</li><li>As your rating improves, continue step 4 and solve problems within the rating range of [your rating - 100, your rating + 100].</li><li>Keep learning new algorithms and practice implementing them.</li></ul><ol><li><strong>How Problem Setters Find New Problems</strong>: Not all problems in contests are built from scratch. Many problems are a mixture of multiple problems from resources like the <a href="https://cses.fi/problemset/">CSES Problem Set</a>.</li><li><strong>Getting TLE with String as a Key in Ordered Map:</strong> If you&#39;re experiencing performance issues with a string as a key in an ordered map, try using a hash map instead. This change may improve the performance.</li><li><strong>IDE Recommendation</strong>: In competitive programming, it&#39;s recommended not to use an IDE. Instead, develop a habit of using a text editor like Vim, this is optional you may avoid it.</li><li><strong>Which Template Should I Use in CP?: </strong>There are various templates available for competitive programming. You can refer to the following resource for templates that are useful in competitive coding: <a href="https://iq.opengenus.org/cpp-template-for-competitive-coding/">Templates Useful for CP</a></li><li><strong>Tips to solve Constuctive :</strong></li></ol><ul><li>Writing a brute force script rather than manual solving</li><li>Finding a pattern</li><li>Coding optimized solution corresponding to pattern</li><li>Taking care of edge cases.</li></ul><p>And it’s not end of blog, neither end of your journey, If this adds value to your success, consider looking back after being succesfull and give a thought to giving back to community.</p><p>Stay Happy, Stay Healthy.</p><p>#dsa #competitiveprogramming #dsaroadmap #cproadmap</p><h3><strong>Follow </strong><a href="https://medium.com/u/992ebb207178"><strong>Om Ashish Soni</strong></a><strong>, for more such content.</strong></h3><p>If you have any questions or would like to collaborate, reach out to me. I’m always excited to discuss new ideas and opportunities.</p><ul><li><strong>Email: </strong><a href="/service/mailto:oms279400@gmail.com"><strong>oms279400@gmail.com</strong></a></li><li><strong>LinkedIn: </strong><a href="https://www.linkedin.com/in/om-ashish-soni/"><strong>@om-ashish-soni LinkedIn</strong></a></li><li><strong>Twitter: </strong><a href="https://twitter.com/om_ashish_soni"><strong>@om_ashish_soni Twitter</strong></a></li><li><strong>YouTube: </strong><a href="https://www.youtube.com/@om_ashish_soni/"><strong>@om_ashish_soni YouTube</strong></a></li><li><strong>Hugging Face : </strong><a href="https://huggingface.co/om-ashish-soni"><strong>@om-ashish-soni HuggingFace</strong></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=09789df3df55" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>