DSA & Algorithms
59 articles in this topic

How the MERN Stack Fits Together: One Request Traced from a React Click to MongoDB and Back
Follow one Enroll action through React, HTTP, Express, Mongoose, and MongoDB, then trace the JSON response back to the browser and its updated state.

Linked Lists and Trees in Python from Scratch: Node Classes, Traversals, and Interview Problems
Build linked lists and binary search trees with plain Python objects, then trace reversal, insertion, and traversal patterns that interviews repeatedly test.

Binary Tree Problems in Java: Traversals, Height, and the One Recursive Template Interviews Keep Testing
Learn one Java recursion pattern for binary-tree traversals, height, node counting, and diameter. Every result is worked on the same six-node tree.

Python for GATE DA: Programming and Data Structures, the Output Questions to Master
Build the Python mental model that GATE DA output and complexity questions demand, with a complete aliasing trace, a structure-cost table and safe rules for common traps.

HashMap Internal Working in Java: Hashing, Buckets, Treeification and the Interview Answer
Build the interview answer in four layers: index calculation, collision handling, resizing and treeification. Then test it against a mutable-key failure.

Python Data Structures: Lists, Tuples, Sets, Dictionaries
Choose among Python's four core containers by the operation you need most. See costs, hashability rules, a decision table and crisp interview answers.

Java Collections Framework Explained: ArrayList, HashMap and TreeMap
Choose Java collections by their contract and operation cost. What ArrayList, LinkedList, HashSet, HashMap and TreeMap each guarantee, what each costs, and how to say so in an interview.

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. The O(n) build-heap bound comes from a height-weighted sum, a seven-element build takes exactly four swaps, and heap questions keep landing in five recognisable shapes.