GATE CS roadmap

Programming & data structures

The base everything else builds on: how data is laid out and moved. 8 topics, about 32 hours.

  1. Arrays and searching

    About 3 h.

    • Trace linear, binary, jump and interpolation search and count comparisons
    • Say when binary search applies and find its off-by-one traps

    Visualisers: Searching

  2. Stacks and queues

    About 4 h.

    • Convert infix to postfix and evaluate postfix with a stack
    • Implement a circular queue and explain the full vs empty condition

    Visualisers: Stacks & queues

  3. Linked lists

    About 4 h.

    • Insert, delete and reverse singly and doubly linked lists by hand
    • Compare list and array costs for each operation

    Visualisers: Linked lists

  4. Binary trees and BSTs

    About 6 h.

    • Write all four traversals of a tree
    • Delete from a BST in all three cases
    • Rebuild a tree from two traversals

    Visualisers: Binary search tree

  5. Balanced trees (AVL)

    About 4 h.

    • Pick the right rotation (LL, RR, LR, RL) from balance factors
    • Bound the height of an AVL tree with n nodes

    Visualisers: AVL tree

  6. Heaps and priority queues

    About 4 h.

    • Insert and extract on a heap stored as an array
    • Explain why build-heap is O(n), not O(n log n)

    Visualisers: Binary heap

  7. Hash tables

    About 4 h.

    • Fill a table with chaining, linear, quadratic and double hashing
    • Count probes and explain primary and secondary clustering

    Visualisers: Hashing & indexing

  8. Tries and disjoint sets

    About 3 h.

    • Build a trie and use it for prefix search
    • Run union-find with union by rank and path compression

    Visualisers: Trie, Union-find