Skip to content

br-lovanshi/Data-Structure-And-Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DSA Progress Tracker

This README serves as a structured record of all the Data Structures and Algorithms (DSA) topics I have studied, along with problem-solving approaches, time complexities, and solved problems. This will help in tracking progress, revisiting concepts, and improving problem-solving skills.


πŸ“Œ Table of Contents


πŸ† Tracking Progress

Each topic has:

  • βœ… Checkmark to indicate completion.
  • πŸ“Œ Priority Level (High/Medium/Low) to decide importance.
  • πŸ“– Understanding Section to summarize key concepts.
  • πŸ”— Solved Problems section to list related problems.

πŸ“‚ Topics

πŸ“ Binary Search

πŸ“ Rotated and Sorted Array


πŸ“ Bubble Sort

  • πŸ“Œ Priority: Medium
  • What is Bubble Sort?
    Bubble Sort is a simple comparison-based algorithm where each pair of adjacent elements is compared and swapped if they are in the wrong order.
  • Time Complexity: O(nΒ²), Best Case O(n) when array is already sorted.
  • Solved Problems:

πŸ“ Selection Sort

  • πŸ“Œ Priority: Medium
  • What is Selection Sort?
    Selection Sort selects the smallest (or largest) element from the unsorted part and swaps it with the first unsorted element.
  • Time Complexity: O(nΒ²)
  • Solved Problems:

πŸ“ Insertion Sort

  • πŸ“Œ Priority: Medium
  • What is Insertion Sort?
    Insertion Sort builds the sorted array one element at a time by comparing and inserting elements into their correct position.
  • Time Complexity: O(nΒ²), Best Case O(n)
  • Solved Problems:

πŸ“ Cycle Sort

πŸ“ Merge Sort

  • πŸ“Œ Priority: High
  • What is Merge Sort?
    Merge Sort is a divide and conquer algorithm. It divides the array into halves, sorts each half, and merges them to produce a sorted array.
  • Key Idea:
    Recursively split the array into two halves, then merge them in a sorted way.
  • Time Complexity:
    • Worst: O(n log n)
    • Best: O(n log n)
    • Space: O(n) (not in-place by default)
  • When to Use:
    When you need guaranteed O(n log n) performance, especially with large datasets.
  • Solved Problems:

πŸ“ Kadane's Algorithm

  • Status: In Progress / Completed
  • πŸ“Œ Priority: High
  • What is Kadane's Algorithm?
    Kadane's Algorithm is used to find the maximum sum subarray in an array using a dynamic approach.
  • Approach:
    • Initialize max_sum and current_sum as the first element.
    • Iterate through the array and update current_sum by adding the current element or starting fresh.
    • Update max_sum whenever current_sum is higher.
  • When to Use?
    • When finding the largest sum of contiguous elements.
  • Time Complexity:
    • O(n)
  • Solved Problems:

πŸ“ 2D Arrays

  • Status: In Progress / Completed
  • πŸ“Œ Priority: Medium
  • What are 2D Arrays?
    2D arrays are arrays where each element is itself an array, forming a matrix-like structure.
  • Approach:
    • Iterating using nested loops.
    • Common operations: searching, transposing, rotating.
  • When to Use?
    • When dealing with matrices or grids.
  • Time Complexity:
    • Varies based on operation.
  • Solved Problems:

πŸ“ Two Pointer Technique

  • πŸ“Œ Priority: High

  • What is Two Pointer Technique?
    This technique uses two pointers (usually i and j) that iterate through the array to solve problems in a linear or near-linear time.

  • When to Use:

    • On sorted arrays or strings
    • To find pairs or subarrays
    • Problems like removing duplicates, finding a pair with a sum, merging arrays, etc.
  • Time Complexity: O(n) or O(n log n) depending on the problem

  • Solved Problems:


πŸ“ Sliding Window Technique

  • πŸ“Œ Priority: High

  • What is Sliding Window Technique?
    This technique is used to reduce nested loops to a single loop by maintaining a "window" of elements over the array or string and sliding it based on conditions.

  • Types:

    • πŸ”Ή Fixed-size window – size k is constant
    • πŸ”Ή Dynamic-size window – window expands or shrinks based on constraints (e.g., sum, characters, frequency)
  • Time Complexity: O(n)

    • You iterate through the array once using two pointers.
  • When to Use:

    • Maximum or minimum of subarrays
    • Longest/shortest substring problems
    • Problems involving ranges or conditions that can be checked by sliding across elements
  • Solved Problems:


πŸ“ Recursion

  • Status: In Progress / Completed

  • πŸ“Œ Priority: High

  • What is Recursion?
    Recursion is a programming technique where a function calls itself to solve smaller instances of a problem until it reaches a base case.

  • Approach:

    • Break down the problem into smaller sub-problems.
    • Define the base case (stopping condition).
    • Define the recursive case (how to reach the base case).
    • Make the recursive call and combine the result if needed.
  • When to Use?

    • When a problem can be divided into smaller, similar sub-problems (e.g., factorial, Fibonacci, tree/graph traversal).
  • Why to Use?

    • Makes complex problems simpler to express and solve.
    • Essential for solving problems involving divide-and-conquer, backtracking, and tree-like structures.
  • Remarks:

    • Always define a clear base case to avoid infinite recursion.
    • Each recursive call adds a new stack frame β†’ may cause StackOverflow if depth is too large.
    • Can often be converted to iteration or dynamic programming for optimization.
  • Time Complexity:

    • Varies by problem (can be exponential if overlapping subproblems are not optimized).
  • Solved Problems:


πŸ“ Prefix Sum

  • Status: In Progress / Completed

  • πŸ“Œ Priority: High

  • What is Prefix Sum?
    Recursion

  • Approach:

    • Break down the problem into smaller sub-problems.
    • Define the base case (stopping condition).
    • Define the recursive case (how to reach the base case).
    • Make the recursive call and combine the result if needed.
  • When to Use?

    • When a problem can be divided into smaller, similar sub-problems (e.g., factorial, Fibonacci, tree/graph traversal).
  • Why to Use?

    • Makes complex problems simpler to express and solve.
    • Essential for solving problems involving divide-and-conquer, backtracking, and tree-like structures.
  • Remarks:

    • Always define a clear base case to avoid infinite recursion.
    • Each recursive call adds a new stack frame β†’ may cause StackOverflow if depth is too large.
    • Can often be converted to iteration or dynamic programming for optimization.
  • Time Complexity:

    • Varies by problem (can be exponential if overlapping subproblems are not optimized).
  • Solved Problems:

πŸ“Œ More Topics

  • Two Pointers
  • Sliding Window
  • Recursion & Backtracking
  • Dynamic Programming
  • Graphs & Trees
  • Sorting & Searching Algorithms

πŸ” How to Use This Tracker?

  • Mark a checkbox (βœ…) when a topic is completed.
  • Update priority levels based on difficulty.
  • Add new problem links as you solve more.
  • Keep refining your understanding over time.

This document will help in revisiting concepts quickly and keeping track of progress systematically. πŸš€

🌍 Connect with Me


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published