01Chapter 1: Cost model: counting operations and memoryAssume that you can write basic loops and functions, use object references or pointers, and read Big-O notation. This chapter uses those ideas to compare data-structure operations.2 min read
02Chapter 2: Arrays: contiguous memory and index arithmeticAssume you know loops, functions, references or pointers, and introductory Big-O notation. An array is a fixed-size sequence whose elements occupy consecutive memory locations. Every element has the same type and size.2 min read
04Chapter 4: Singly linked lists: nodes, traversal, insertion, deletionAssume you know loops, object references or pointers, and introductory Big-O notation. A singly linked list stores elements in separate nodes. Each node contains a value and a reference called next to the following node. The last node points to None.1 min read
05Chapter 5: Doubly and circular linked listsAssume you know singly linked lists, object references, loops, and introductory Big-O notation. A linked list stores elements in nodes. Each node contains data and references to other nodes.2 min read
06Chapter 6: Reversal, middle node, and cycle detectionAssume you know singly linked lists, object references, loops, and Big-O notation. A node stores data and a reference named next to the next node. The last node points to None.1 min read
07Chapter 7: Stacks: LIFO, push, pop, and overflow/underflowAssume you know loops, functions, object references, and introductory Big-O notation. A stack is a linear abstract data type (ADT) in which insertion and removal happen at one end, called the top. Its rule is LIFO, or “last in, first out.” The newest item leaves first, like the top plate in 1 min read
10Chapter 10: Circular queues: wrap-around and full/empty conditionsAssume you know arrays, indexing, loops, and Big-O notation. A circular queue is a queue implemented with a fixed-size array. It follows FIFO order: the first element inserted is the first element removed.1 min read
11Chapter 11: Deques and restricted queuesAssume you know the queue ADT, arrays, circular indexing, and Big-O notation. A deque is a double-ended queue. It allows insertion and deletion at both the front and the rear. The name comes from “double-ended queue.”1 min read
13Chapter 13: Priority queues: the abstract interfaceAssume you know arrays, linked lists, Big-O notation, and basic classes and functions. A priority queue is an abstract data type (ADT). An ADT describes what operations mean, but not how the data is stored.2 min read
15Chapter 15: Heap insert, extract-min/max, and sift operationsAssume you know arrays, loops, functions, object references, and introductory Big-O notation. A binary heap is a complete binary tree stored in an array. A min-heap keeps the smallest key at the root. A max-heap keeps the largest key at the root.1 min read
16Chapter 16: Building a heap in O(n)Assume you know arrays, zero-based indexing, loops, binary trees, and Big-O notation. A binary heap is a complete binary tree stored in an array. In a min-heap, every parent is less than or equal to its children.2 min read
17Chapter 17: Heap sort: algorithm and costAssume you know arrays, binary heaps, zero-based indexing, and Big-O notation. Heap sort combines bottom-up heap construction with repeated removal of the largest element.1 min read
18Chapter 18: GATE problem patterns and a structure comparison tableAssume you know loops, references or pointers, basic recursion, and introductory Big-O notation. This chapter shows how to recognize common GATE patterns and select the correct data structure quickly.2 min read