DSA & Algorithms
16 articles in this topic

Minimum Spanning Tree for GATE: Kruskal and Prim Numericals with Unique-MST Questions
Run Kruskal and Prim on the same weighted graph, verify their common cost, and use cut, cycle, and equal-weight reasoning to answer uniqueness questions.

Construct a Binary Tree from Traversals
Use inorder splits and preorder roots to rebuild a binary tree, then learn the BST shortcut and the cases where traversal data is not unique.

Banker's Algorithm for GATE: Safe Sequence Numericals with Full Allocation-Max-Need Matrices
Learn the safety algorithm through a five-process matrix, count every safe sequence, and repair an unsafe state with the smallest possible resource addition.

Page Replacement Algorithms for GATE: FIFO, LRU and Optimal with Belady's Anomaly Explained
One shared reference string traced fault by fault through FIFO, LRU and Optimal page replacement with 3 frames, then re-run under FIFO with 4 frames to demonstrate Belady's anomaly. Includes the counting rules GATE expects, why LRU beating FIFO is a tendency and not a theorem, and the stack-algorithm property that makes LRU and Optimal immune to the anomaly.

Binary Heaps for GATE: Build-Heap, Heapify and Deletion Numericals Solved
Heapify, build-heap and deletion are the three heap procedures GATE CS tests as numericals. This guide derives the O(n) build-heap bound properly, solves a full build and two deletions step by step, and maps the five question shapes heaps keep appearing in.

IBPS SO IT Officer Data Structures and programming: professional knowledge topics
IBPS SO IT Officer Data Structures and programming: arrays, linked lists, stacks, trees, hashing, sorting, complexity and C basics for the Mains PK paper.

DSA interview questions for placements: the patterns freshers must know
Most DSA interview questions are not new. They are variations on a small set of recurring patterns, and once you can recognise the pattern behind a question, the solution follows almost mechanically. Freshers who memorise fifty specific problems stall on the fifty-first. Freshers who learn the seven or eight underlying patterns can attack a problem they have never seen.

Time complexity and asymptotic notation: Big-O, Theta and Omega explained
Time complexity and asymptotic notation explained: Big-O, Theta and Omega, growth-rate ordering, analysing loops and recursion, and the Master Theorem.

Greedy algorithms: strategy, exchange arguments and classic problems
Greedy algorithms explained: greedy-choice property, activity selection, a traced Huffman tree, fractional knapsack, and where greedy fails on 0/1 knapsack.

Hashing and collision resolution: hash functions, chaining and open addressing
Hashing and collision resolution explained: hash functions, load factor, separate chaining, and open addressing with linear, quadratic and double hashing.

Stacks and queues: operations, applications and the exam angle
Stacks and queues explained: LIFO vs FIFO, array and linked implementations, a worked postfix evaluation, and the circular-queue full and empty conditions.

Graph Theory: Euler and Hamiltonian Paths, Coloring and Connectivity
Graph theory for GATE CS: degree and handshaking, Euler vs Hamiltonian paths, planarity and Euler's formula, chromatic number, trees and spanning trees.