DSA & Algorithms

106 articles in this topic

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 30 Oct 20266 min read60 viewsDSA & 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 30 Oct 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 read131 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 30 Oct 20266 min read80 viewsDSA & 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 30 Oct 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 30 Oct 20265 min read79 viewsDSA & 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 30 Oct 20266 min read65 viewsDSA & 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 30 Oct 20265 min read82 viewsDSA & 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 30 Oct 20266 min read112 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 30 Oct 20266 min readDSA & Algorithms

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.

Updated 30 Oct 20266 min read391 viewsDSA & Algorithms