CSE 102
Data Structures
Build every classic data structure in C — linked lists, stacks, queues, trees, heaps, graphs and hash tables — and learn exactly when to use each one.
0%complete
- Lessons
- 21
- Runnable examples
- 41
- Quiz questions
- 84
- Visualizers
- 10
What you will be able to do
- Measure code with Big-O time and space complexity
- Implement linked lists, stacks and queues from scratch
- Build and traverse binary trees, BSTs, AVL trees and heaps
- Represent graphs and run BFS and DFS
- Use hashing and resolve collisions
- Pick the right searching and sorting algorithm
Syllabus
Unit 1Foundations
- 1Introduction to Data StructuresWhat a data structure is, abstract data types, linear vs non-linear structures, and why choosing well matters more than coding fast.
- 2Time & Space ComplexityCount steps instead of seconds: Big-O notation, the common growth rates, analysing loops, and best, average and worst cases.
- 3Arrays as a Data StructureArrays from the data-structure point of view: O(1) access, the cost of insertion and deletion by shifting, and when an array is the right choice.
Unit 2Linked Lists
- 4Singly Linked ListNodes joined by pointers: create, traverse, insert at the head, tail or a position, delete, and search — with every operation's cost.
- 5Linked List ProblemsThe classic interview and exam problems: reverse a list, find the middle, detect a cycle with Floyd's algorithm, merge two sorted lists and remove duplicates.
- 6Doubly & Circular Linked ListsLists that go both ways or loop around: node structure, insertion and deletion in a doubly linked list, circular lists, and when to use each.
Unit 3Stacks & Queues
- 7StackLast in, first out: push, pop and peek, overflow and underflow, and two implementations — with an array and with a linked list.
- 8Stack ApplicationsBalanced brackets, infix to postfix conversion and postfix evaluation — the three stack algorithms every CSE 102 exam asks you to trace.
- 9Queue & Circular QueueFirst in, first out: enqueue and dequeue, why a simple array queue wastes space, and how the circular queue fixes it — plus a linked-list queue.
- 10Deque & Priority QueueTwo useful queue variations: the double-ended queue and the priority queue, with array-based implementations and where each one shines.
Unit 4Trees
- 11Trees & Binary TreesHierarchical data: tree vocabulary, types of binary trees, array and linked representations, and the four traversals — inorder, preorder, postorder and level order.
- 12Binary Search TreeA binary tree that keeps itself sorted: search, insert, find min and max, and the three cases of deletion — plus why balance matters.
- 13AVL TreesSelf-balancing BSTs: balance factors, the four rotation cases (LL, RR, LR, RL), and an insertion that stays O(log n) whatever order the keys arrive in.
- 14Heaps & Heap SortComplete binary trees stored in arrays: max-heaps and min-heaps, insert with sift-up, extract with sift-down, building a heap in O(n), and heap sort.
Unit 5Graphs & Hashing
- 15Graphs: Terminology & RepresentationVertices and edges: directed, weighted and connected graphs, degree, paths and cycles, and storing graphs as adjacency matrices and adjacency lists.
- 16Graph Traversal: BFS & DFSExplore a graph level by level with a queue (BFS) or as deep as possible with a stack or recursion (DFS) — with step-by-step traces, shortest paths and applications.
- 17HashingNear O(1) search with hash tables: hash functions, collisions, separate chaining, linear and quadratic probing, double hashing and the load factor.
Unit 6Searching & Sorting
- 18Linear & Binary SearchFind things fast: linear search for any list, binary search for sorted ones — iterative and recursive versions, step-by-step traces and the classic off-by-one traps.
- 19Bubble, Selection & Insertion SortThe three O(n²) sorts: how each one works, passes and swaps traced by hand, stability, best cases, and when a simple sort is the right choice.
- 20Merge, Quick & Counting SortFaster sorting: divide-and-conquer merge sort and quick sort with their partition traces, plus counting and radix sort that beat O(n log n) on integers.
- 21Data Structures Cheat SheetEvery structure and algorithm from CSE 102 on one page: operation costs, when to use what, key formulas and the programs to practise.