/data-structures-and-algorithm

My DSA journey....🚶‍♂️

Primary LanguageC++

data-structures-and-algorithm

Constraints - Input | Worst Time Complexity

n ≤ 12 | O(n!)

n ≤ 25 | O(2^n)

n ≤ 100 | O(n^4)

n ≤ 500 | O(n^3)

n ≤ 10^4 | O(n^2)

n ≤ 10^6 | O(n log n)

n ≤ 10^8 | O(n)

n > 10^8 | O(log n) or O(1)

List of standard question

  • Array

    1. Reverse Array

    2. delete an element from the array

      • linear search
      • binary search
      • hashing
    3. search element in the array

    4. insert an element in array

    5. sort the array

      image

      • insertion sort
      • selection sort
      • bubble sort
      • merge sort
      • quick sort
      • heap sort
      • count sort
      • tree sort
    6. find min and max elements

    7. find maximum subarray sum

    8. find first max element

    9. find second max element

    10. find kth smallest element

    11. find kth largest element

    12. sort array of 0,1,2

    13. find duplicates in array or print duplicates

    14. remove duplicates

  • String

    1. print string
    2. reverse string
    3. reverse string by words
    4. check weather string is anagram or not
  • Linked List

    1. implement single linked list
    2. implement double linked list
    3. implement circluler linked list
    4. insert node in ll
    5. search node in ll
    6. delete node in ll
    7. find length of the list
    8. find middle node of list
    9. revese linked list
  • Tree

    • Binary Tree
    • Binary Search Tree
    • AVL Tree (Self Balanced Binary Search Tree)
    • Red Black Tree
  • Graph

  • Types of Graph

  •   1. Undirected 2. Directed
    
  •   1. Cyclic 2. Acyclic
    
  • Graph Representation

  •   1. Adjacency Matrix 2. Adjacency List
    
  • BFS and DFS

  • Topological sort

  •   Directed acyclic graph
    
  • Prims and Qrushkal

  • Dijkstra Algorithm

  • Dynamic Programming

    • 01 Knapsack
    • Fibbonaci series
    • Largest common subsequence
    • Longest increasing subsequence

    Lokesh singh

image

200 medium problems solved 27th march 2024. now target for next 100 medium problems.

image image 400 problems solved image

image