How to start Data Struture & Algorithm (DSA) as Begineers

How to start Data Struture & Algorithm (DSA) as Begineers

December 12, 2024·5 min read·
#Programming#Problem Solving#Data Structure and Algorithm

Learning Dsa its become hard if you do not follow right path as beginners , if you starts good then you can finish it good

Steps You have to follow to learn DSA

8 step formula to learn DSA

  1. Start with any language

      Preferred  **c++**  , else can be java , js ,python etc
    
  2. Learn all basics of language as

       Basics syntax
    
       Operators
    
       conditional statements
    
       Loops
    
       Array and Strings
    
       STL (for cpp/c++)
       
    
  3. Time and Space Complexity

  4. Algorithms

    4.1 Searching algorithms

    Linear search
    
    Binary Search
    

    4.2 Sorting algorithms

    Selection Sort
    
    Bubble Sort
    
    Insertion Sort
    
    Merge Sort
    
    Quick Sort
    
    Count Sort
    
    Vector sort
    
  5. Learn Recursion

    All basics level understanding , work flow of corresponding language (how things work behind the scene ) and One should practice all classical problems

  6. Now You can start with learning actual data structure topics

       Arrays
    
       String
    
       Linked list
    
       Stack
    
       Queue
    
       Sets / Maps
    
       Tree  ( Binary Tree  + BST )
       
       Heaps (min/max heap)
    
       Segment Tree
    
       Graph
    
  7. Learn paradiams

     Prefix sum and contribution
     
     Sliding window 
         - Fixed window size
         - Variable window size
     	    - using heaps
     	    - using aggregate queues (min / max stack)
     
     Recursion (Some advanced level)
     *recursion is basic foundation for learning backtracking and dynamic programming*
    
     Backtracking
     
     Greedy Alogorithm
          - Fractional knapsack
          - Merge intervals
          - Jump game
          - Meeting rooms
          - Course scheadule
    
     Dynamic programming (DP)
          - Basic dp (climb stairs ,  fibonacci, Frog jump ,  min cost path in grid )
          - Knapsack (Bounded and unbounded)
          - Dp on stocks
          - Dp for LCS (longest common subsequence)
          - Dp for LIS (Longest increasing/descreasing  subsequence )
          - Path recovery (advanced)
          - Tabulation
          - Space optmization
    
  8. Revision it must important (Through Short notes - have cheat sheet prepared by your self)

Link - Roadmap to learn DSA

Resources -

CodeHelp Strivers A2Z-DSA Course

Written by Manish Patidar

Comments

Loading…
“Man is made by his belief. As he believes, so he is.”_
— Bhagavad Gita