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.

Updated 8 Aug 20266 min readDSA & Algorithms

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.

Updated 6 Aug 20266 min readDSA & Algorithms

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.

Updated 3 Aug 20267 min readDSA & Algorithms

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.

Updated 1 Aug 20265 min read86 viewsDSA & Algorithms

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.

Updated 29 Jul 20266 min readDSA & Algorithms

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.

Updated 26 Jul 20265 min readDSA & Algorithms

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.

Updated 24 Jul 20265 min readDSA & Algorithms

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.

Updated 21 Jul 20266 min readDSA & Algorithms

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.

Updated 20 Jul 20265 min readDSA & Algorithms

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.

Updated 19 Jul 20266 min read51 viewsDSA & Algorithms

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.

Updated 19 Jul 20268 min readDSA & Algorithms

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.

Updated 18 Jul 20266 min readDSA & Algorithms