DSA & Algorithms

106 articles in this topic

Dijkstra’s Algorithm Explained: Worked Example, Complexity and Exam Traps

Build Dijkstra’s algorithm from its core invariant, trace every relaxation on a six-vertex graph, and learn exactly where the method works and fails.

Updated 5 Dec 20265 min readDSA & Algorithms

Merge Sort Explained: Step-by-Step Trace, Complexity and Exam Questions

Follow Merge Sort from its inclusive-index pseudocode through a complete seven-element trace. Then revise its recurrence, stability, auxiliary space and common exam question forms.

Updated 5 Dec 20266 min readDSA & Algorithms

Insertion Sort Explained: Worked Example, Complexity and Exam Traps

Learn how insertion sort grows a sorted prefix, trace every pass on a five-element array, and avoid mistakes when counting comparisons, shifts, and writes.

Updated 4 Dec 20265 min readDSA & Algorithms

Comparisons and Searching in Algorithms: Worked Examples, Bounds and GATE Patterns

Count the operation a question actually asks for. These worked traces show how to analyse linear search, binary search, paired min-max and comparison lower bounds.

Updated 3 Dec 20266 min readDSA & Algorithms

Bubble Sort Explained: Step-by-Step Trace, Complexity and Exam Traps

Trace bubble sort comparison by comparison, prove why it works, and learn how loop variants change operation counts, stability and best-case time.

Updated 3 Dec 20266 min readDSA & Algorithms

Substitution Method for Recurrences: Step-by-Step Proofs and Worked Examples

Substitution turns a recurrence guess into a valid induction proof by closing constants, base cases, and inequalities, including hypothesis repair and rounded inputs.

Updated 2 Dec 20266 min readDSA & Algorithms

Quick Sort Explained: Partition Traces, Complexity and GATE Practice

Trace Quick Sort step by step, distinguish its partition schemes, derive its time and space costs, and solve the question forms that commonly test the concept.

Updated 1 Dec 20266 min readDSA & Algorithms

Sorting Algorithms Explained: Stability, Complexity and Worked Traces for GATE CS

Learn to classify sorting methods, trace insertion sort by hand, compare time and space costs, and avoid common lower-bound and stability traps.

Updated 1 Dec 20265 min readDSA & Algorithms

Heap Sort for GATE: Build-Heap, Full Trace and Exam Practice

Make heap sort mechanical with one fully traced array, clear heap boundaries, a linear-time build explanation and three original exam-style drills.

Updated 30 Nov 20266 min readDSA & Algorithms

GATE 2015 Algorithm Questions: 13 PYQs Across 5 Topic Families

See how 13 GATE 2015 Algorithm PYQs divide across five topic families, then work the recurrences, MST constraints, runtime scaling and asymptotic traps.

Updated 29 Nov 20266 min readDSA & Algorithms

Advanced Iterative Loops and Code: Worked Time Complexity Examples

Trace changing steps and dependent bounds before naming a complexity class. Two complete examples show why similar nested loops can be Theta(n) or Theta(n log n).

Updated 28 Nov 20266 min readDSA & Algorithms

Recursion in C Tutorial: Base Cases, Call Stacks, and 4 Runnable Examples

Learn a repeatable way to trace recursive C functions through four complete programs: digit printing, factorial, array sum, and Euclid's GCD.

Updated 27 Nov 20266 min readDSA & Algorithms