Skip to content

dhanujtomar/DSA

Repository files navigation

Data Structures and Algorithms

This repository contains a collection of data structures and algorithms organized by categories and specific problems. It aims to provide solutions and insights into a wide range of topics, from basic to advanced levels.

View Progress

Table of Contents

  1. LinkedList
    • Reverse Linked List using recursion and iteration
    • Reverse K groups in a Linked List
  2. Stack
  3. Queue
  4. Arrays
  5. Sorting
  6. Binary Search
  7. Linked List
  8. Binary Tree
  9. Binary Search Tree
  10. Heaps
    • Kth largest sum in subarray
    • Merge K sorted arrays
    • Merge K sorted Linked Lists
  11. Tries
    • Search Bar
  12. Graphs

Important Questions

1. LinkedList

Details and solutions for various linked list problems.

2. Stack

Rat in a Maze problem

Description and solution for the Rat in a Maze problem.

Design Special Stack

Implementation details for designing a special stack.

Area of Histogram

Algorithm to find the area of a histogram using stacks.

Celebrity Problem (Matrix)

Solution for identifying the celebrity in a matrix.

Largest Rectangle in matrix - Histogram Approach

Approach to find the largest rectangle in a matrix using histograms.

N stacks in an array (Redo, stack) - Advance Question

Advanced problem on implementing N stacks in an array.

3. Queue

Details and solutions for various queue problems.

4. Arrays

Details and solutions for various array problems.

5. Sorting

Merge Sort

Implementation and explanation of the Merge Sort algorithm.

Quick Sort

Implementation and explanation of the Quick Sort algorithm.

6. Binary Search

Painter's Partition Problem

Solution for the Painter's Partition Problem using binary search.

Allocate Books

Binary search approach to solve the book allocation problem.

Cow stalls problem

Binary search solution for the cow stalls problem.

Peek Element using Binary Search

Finding the peak element in an array using binary search.

Pivot Element

Identifying the pivot element in an array using binary search.

7. Linked List

Clone Linked List with Random Pointer

Solution for cloning a linked list with random pointers.

8. Binary Tree

Diameter of Binary Tree

Algorithm to find the diameter of a binary tree.

Boundary Traversal

Method to traverse the boundary of a binary tree.

Morris Traversal - Advanced and Very Important

Explanation and implementation of Morris Traversal for binary trees.

Vertical Order Traversal - Advanced Question

Solution for the vertical order traversal of a binary tree.

9. Binary Search Tree

Merge 2 Binary Search Trees

Algorithm to merge two binary search trees.

10. Heaps

Kth largest sum in subarray

Solution to find the Kth largest sum in a subarray.

Merge K sorted arrays

Algorithm to merge K sorted arrays.

Merge K sorted Linked Lists

Algorithm to merge K sorted linked lists.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors