UGC NET CS Formula Chart
239+ formulas across 8 subjects
Algorithm Complexity
(23 formulas)Constant
Does not depend on input size
Example: Array access, hash lookup
Logarithmic
Halves problem each step
Example: Binary search
Linear
Proportional to input
Example: Linear search, single loop
Linearithmic
n times log n
Example: Merge sort, heap sort
Quadratic
Nested loops
Example: Bubble sort, insertion sort
Cubic
Triple nested loops
Example: Floyd-Warshall, matrix multiply
Exponential
Doubles with each input
Example: Subset enumeration, TSP brute force
Factorial
All permutations
Example: Permutation generation
Master Theorem Case 1
f(n) is polynomially smaller
Where: a≥1 subproblems, b>1 size reduction, f(n) combine cost
Master Theorem Case 2
f(n) is same order
Where: a≥1 subproblems, b>1 size reduction
Master Theorem Case 3
f(n) is polynomially larger
Where: a≥1 subproblems, b>1 size reduction
Binary Search
Divide by 2, constant work
Example: a=1, b=2, f(n)=1
Merge Sort
Two halves, linear merge
Example: a=2, b=2, f(n)=n
Strassen Matrix
7 subproblems of half size
Example: a=7, b=2, f(n)=n²
Bubble Sort
Best: O(n) with early exit
Where: Stable, in-place
Selection Sort
Always O(n²), not stable
Where: In-place, not stable
Insertion Sort
Best: O(n) for sorted input
Where: Stable, in-place, online
Merge Sort
Always O(n log n)
Where: Stable, not in-place
Quick Sort
Worst case on sorted input
Where: Not stable, in-place
Heap Sort
Build heap O(n) + extract O(n log n)
Where: Not stable, in-place
Counting Sort
k = range of values
Where: Stable, not comparison-based
Radix Sort
d = digits, k = base
Where: Stable, not comparison-based
Comparison Sort Lower Bound
Any comparison-based sort needs at least n log n comparisons
Where: Decision tree has n! leaves, height ≥ log₂(n!)