This is Repo for Various Type of DSA Question. where I Upload all my coding Quetion Code from diff paltform. Like leetcode , GFG , Codechef , Codeforces
This repository contains all the coding problems solved by me.
Find all topic wise questions in different folders:)
From Basic to Hard level questions under each topic
Problems are from Leetcode and Geeksforgeeks website.
Separate folders for CP. All Solutions are not optimised
Data Structures in Big O Notation
Data Structure
Add/Insert
Remove/Delete
Access/Get
Search/Contains
Space Complexity
Array
O(n)
O(n)
O(1)
O(n)
O(n)
Set
O(logn)
O(logn)
-
O(logn)
O(n)
Unordered Set
O(1)Average O(n)Worst
O(1)Average O(n)Worst
-
O(1)Average O(n)Worst
O(n)
Map
O(logn)
O(logn)
-
O(logn)
O(n)
Unordered Map
O(1)Average O(n)Worst
O(1)Average O(n)Worst
-
O(1)Average O(n)Worst
O(n)
Stack
O(1)
O(1)
O(n)
O(n)
O(n)
Queue
O(1)
O(1)
O(n)
O(n)
O(n)
Binary Search Tree
O(log n)
O(log n)
O(log n)
O(log n)
O(n)
Binary Min Heap
O(log n)
O(log n)
O(1)
O(n)
O(n)
Binary Max Heap
O(log n)
O(log n)
O(1)
O(n)
O(n)
Sorting Algorithms in Big O Notiation
Sort Algorithm
Best
Average
Worst
Space Complexity
Selection Sort
O(n^2)
O(n^2)
O(n^2)
O(1)
Bubble Sort
O(n^2)
O(n^2)
O(n^2)
O(1)
Insertion Sort
O(n)
O(n^2)
O(n^2)
O(1)
Quick Sort
O(n logn)
O(n logn)
O(n^2)
O(logn)
Merge Sort
O(n logn)
O(n logn)
O(n logn)
O(n)
Counting Sort
O(n+k)
O(n+k)
O(n+k)
O(k)
Tim Sort
O(n)
O(n logn)
O(n logn)
O(n)
Heap Sort
O(n long)
O(n logn)
O(n logn)
O(1)
Shell Sort
O(n)
O((n logn)^2)
O((n logn)^2)
O(1)
Bucket Sort
O(n+k)
O(n+k)
O(n^2)
O(1)
Radix Sort
O(nk)
O(nk)
O(nk)
O(n+k)
DSA Practice
This is the repository for C++ topic wise questions, practice questions and DSA :)
About
This is Repo for Various Type of DSA Question. where I Upload all my coding Quetion Code from diff paltform. Like leetcode , GFG , Codechef , Codeforces