O Notation => It also known as worst case time complexity as it denotes the upper bound in which algorithm terminates
Ω Notation => We denote it by Ω(g(n)). Pronounced as "big-omega of g of n". It also known as best case time complexity as it denotes the lower bound in which algorithm terminates
Θ Notation => It is used to denote the average time of a program
Cubic > Quadratic > Logarithmic > Linear > Constant
108 Operation Rule => Most of the modern machines can perform 108 operation/second
Space Complexity
Memory required as function of input
Maximum space required at any point of time
Problems
Recursion
Inversion Count
Subsets
Subsequences
Phone Keypad Question
Permutations of a String/Integers
Rat in a Maze Problem
N-Queen Problem
Sudoku Solver
Linked List
Floyd Cycle Detection => Detect & Remove Loop
Remove Duplicates from a Sorted/UnSorted Linked List
Add 2 numbers
Stack
Reverse String
Valid Parenthesis
Largest Rectangle in Histogram
Celebrity Problem
N Stacks in an Array
Queue
Queue Reversal
N Queue in an Array
Binary Tree
Lowest Common Ancestor
Construct a Binary Tree from InOrder/PreOrder/PostOrder Traversal
Minimum Time to BURN Binary Tree
Morris Traversal
Flatten a Binary tree to Linked List
Merge 2 Binary Search Trees
Largest BST in a Binary Tree
Heap
Kth Smallest element
Merge 2 Heaps
Is Tree a Heap
Convert BST into HEAP
Merge K sorted Arrays
Smallest Range in K sorted List
Median in a Stream
Re-Organise Strings
Trie
Longest Common Prefix
Phone Directory
Graph
Cycle Detection
Shortest Path
Dynamic Programming
Minimum Cost Climbing Stairs
Minimum Number of Coins
Minimization and Maximization problems
Find the number of ways
Binary Search
First and Last Position of an element
Find total no. of Occurrence
Find Peak in Mountain array
Find Pivot in Sorted & Rotated array
Search an Element in a Sorted & Rotated array
Find Square Root of an Integer (both int & floating part)
Book Allocation Problem
Painter’s Partition Problem
Aggressive Cows Problem
Number Theory
BigInteger
Java class for the mathematical operation which involves very big integer calculations that are outside the limit of all available primitive data types
#define ull unsigned long long => In C++
Pigeon hole Principle
If there are more pigeons than pigeonholes, then there must be at least one pigeonhole with at least two pigeons in it
Inclusion-Exclusion
In the field of Combinatorics, it is a counting method used to compute the cardinality of the union set
Applications
Derangements/Permutations
Others
Armstrong Number
Numbers which have their sum of cube of its individual digits equal to the number itself
Fibonacci Series
Series of numbers in which each number is the sum of the two preceding numbers
Golden Ratio = 1.6180
Palindrome
ABCBA
Permutation
An ordered arrangement of objects is called Permutations
Catalan Numbers => Cn = sum(Ci * Cn-i)
1 1 2 5 14 42 132 429 1430 4862 ...
Perfect Numbers
Number equal to the sum of its proper divisors except for the number itself