SUPREME_DSA
github repository of DSA challanges
1. Basics of programming
difference of endl and \n
C datatypes
ascii table
negative number storeing
Switch
Miscellaneous
Time comlexity precedence
2. Arrays
Sort zero's & one's (Dutch national flag problem)
Pascal Triangle
CODE SNIPPETS (swapping,reverse array)
Array Practice Questions
sort colors
move all -ve no the left side of array
find duplicate Number
missing elements from an array with duplicate
Find first occurence
Common element in 3 sorted array
Wave print a matrix
Spiral print a matrix
add two number of array
find factorial of number
3. Binary Search
binary search
find first occurrence
find last occurrence
total number of occurrences
find peak element in mountain array
find pivot element in array
search in sorted rotated array
find square root
search in nearly sorted array
Divide two numbers using binary search
Binary search in 2D matrix
index based binary search
find missing elements (index based binary search)
find odd occuring element in an array
3. Sorting
Selection sort
Bubble sort
Insertion sort
STL sort
Practice Questions of searching and sorting
K-Diff Pairs In An Array
Find K-Closest Element
Exponential Search & Unbounded
Binary Search
Book Allocation Problem
Painters Partition Problem
Aggresive Cows
EKO SPOJ
PRATA
4. Char arrays and string
input string methods
check palindrome
remove duplicates
remove all occurrences of part from main string
valid palindrome 2
minimum time difference
palindromic substring
Practice Questions of strings
valid anagram
reverse only letters
longest common prefix
reverse vowels of as string
isomorphic string
reorganize string
group anagram
longest palindromix substring
find the index of first occurence in a string
string to integer (stoi)
string compression
Integers to Roman
Zigzag conversion
Largest number
Pointers and Mathematics algorithms
Seive of Erathosthenes - prime number
GCD euclid algorithm
Modulus properties
Fast exponential pow(a,b)
Pigeon hole
catalan number bst
inclusion exclusion principle
chinese reminder theorem
lucas's theorem
fermat's theorem
probability concepts
Recursion
print 1 to n
factorial
fibonaci
climbing stairs
array print all element using recursion
find max in array using recursion
finding value in array using array
print all digits of number using recursion
finding is array sorted
Binary search using recursion
Subsequence of string
Coin exchange
Cut into segement
Maximum sum of adjacent elements
Practice Questions of recursion
Last occurrence of a char
Reverse a string RE
Add string RE
palindrome check RE
Remove all occurrence of substring
print all subarrays using RE
Buy and sell stocks
House Robber
Integer to English words
Wild card Matching
Perfect squares
Minimum cost for tickets
Number of dice roll with target sum
Divide and Conquer
merge sort
In place Merge sort
quick sort
Backtracking
permutation of string
house robber problem
rate in maze
sudoko solver
N Queen
generate paranthesis
phonekeypad problem
Practice Questions of Backtracking
count inversion
inplace mergesort
max sub array sum
quicksort end element as pivot best way (short)
combination sum
combination sum II
permutation II
Beautiful arrangment
Distribute Repeating Integers
OOPS
Static memory allocation
Dynamic memory allocation
1D array and 2D array heap memory
Constructor
Destructor
Encapsulation
Inheritance
Types of inheritance
Polymorphism
Abstraction
const keyword
mutable keyword
Initialization list
Macros
Shallow copy vs deep copy
local and global variables
Static keyword in class
Abstraction deep
Inline function
friend keyword
private constructor
Virtual constructor vs virtual destructor
LinkedList
Single LinkedList structure
find length of linkedlist
Insert at head
Insert at tail
Insert at position
Delete node at postion
Reverse Linked list using loops
Reverse linked list using recursion
find middle of Linked list
K group reverse Linked list
LL circular detection and deleting loop
LL is palindrome of not
Remove duplicates from sorted LL
Remove duplicates from unsorted LL
Sort 0's 1's and 2's in LL
Add two numbers represented by LL
Doubly LinkedList
Doubly linked list structure
print doubly linked list
length of doubly linked list
Insert at head
Insert at tail
Insert at position
Delete node from position
Practice Questions of LL
Merge 2 Sorted Linked List
Clone a Linked List with Random Pointer
Merge Sort in Linked list
Flatten a Linked List
Print kth node from end of Linked List
Intersection point of 2 Linked list
Rotate List (Leetcode)
Delete n nodes after m nodes (Leetcode)
Find min/max number between critical points (Leetcode)
Merge Node in between zeroes (Leetcode)
Stack
Stack operations
Custom stack implementation (without using STL)
Create 2 stack in one array
reverse string using stack
find middle element in stack
Insert at bottom of stack
reverse a stack using only one stack
Valid parenthesis
Sort a stack
Remove redundant brackets
Min stack (stack containg the minimum element in it)
longest valid parantheses
Next smaller element
Prev Smaller element
Largest rectangular area in histogram
Practice Questions of Stack
Minimum Bracket Reversal
Remove All Adjacent Duplicates In String
Celebrity Problem
Next greater element in Linked List leetcode
N Stacks in an Array
Online Stock Span Leetcode
Check If Word Is Valid After Substitutions Leetcode
Decode Strings Leetcode
Car Fleet - I Leetcode
Car Fleet - 11 Leetcode
Simplify Path Leetcode
Max rectangle in Binary Matrix with all Is
Queue
operations
custom implementation of Queue
Circular Queue
Input restricted Queue
Output restricted Queue
Doubly ended Queue(Deque)
Circular Doubly ended Queue
STL Deque
Reverse a queue
Reverse first k element of queue
Interleave first and second half of Queue
First -ve integer in every window of size k(sliding window + Queue)
Non-repeated character in a string
Gas Station
Sliding window maximum(sliding window + Queue)
Practice Questions of Queue
Implement Queue using stack
Implement Stack using Queue
Implement k Queue in an array
Tree
Types of tree
Terms of tree
Tree traversal
Building tree
Level order Traversal
Inorder Traversal
Preorder Traversal
PostOrder Traversal
Maximum depth / height of binary tree
Maximum depth / height of N-ary tree
Diameter of tree
Check if two tree are identical or not
Check if two trees are mirror images of each other or not
Check if binary tree is balanced binary tree
Check whether BT is sum tree or not/ convert BST into sum tree
Lowest common ancestor
Kth ancestor
Path sum
Path sum II
Sum of longest bloodline
Build tree from inorder and preorder traversal
Top View of binary tree
Bottom view of binary Tree
left view of tree
right view of tree
boundary view of tree
Practice Questions of Tree
Fast way to find diameter of tree
Fast way to determing that binary tree is balanced or not
Check 2 trees are identical or not
Check 2 trees are mirror of each other or not
Diagonal traversal of a binary tree
Zig-Zag traversal of a binary tree
Transform to Sum tree.
Vertical traversal of a binary tree.
Morris traversal of a binary tree
Sum of longest bloodline of a tree
K-sum path in a binary tree
Max sum of non-adjacent nodes in binary tree
Max time to burn a binary tree
Flatten a Binary tree into Linked List
Check if a Binary Tree contains duplicate subtrees of size 2 or more
BST
Practice Questions of BST
Heap
Heap
Max heap
Insertion in max Heap
Deletion in max heap
Heapify
Heap Sort