Explore all chapters and subchapters in a clear, organized format designed for better learning and faster navigation.
Orientation to the whole course: what data structures and algorithms are, why they matter for writing efficient code, and how the chapters fit together. Sets expectations for the journey from arrays to graphs.
Defines a data structure as an organised way of storing data for efficient access. Covers why organisation affects speed, with everyday analogies before any code.
Surveys the main families — linear (array, stack, queue, linked list) and non-linear (tree, graph, hash table) — so you know the landscape before studying each one in depth.
The five core operations every structure supports: traversal, search, insertion, deletion and update. Establishes the vocabulary used throughout the course.
How to measure how long an algorithm takes as input grows, using Big O notation. Covers counting operations and classifying algorithms as constant, linear, logarithmic or quadratic.
How to measure the extra memory an algorithm consumes, separating input storage from auxiliary space, and why memory can matter as much as speed.
Goes beyond Big O to Omega and Theta, and the difference between best, average and worst case. Gives you the precise vocabulary to state a complexity claim correctly.
An algorithm is a step-by-step procedure or formula for solving a problem or performing a task. It is the foundation of computer programming and software development. This comprehensive guide explains what an algorithm is, its characteristics, types, and real-world examples, helping beginners and professionals understand how algorithms power everything from search engines to mobile apps.
Introduces the major strategies — brute force, divide and conquer, greedy, dynamic programming and backtracking — as a map of the paradigms developed later in the course.
Separates the logical interface (what operations a structure promises) from the implementation (how it delivers them). The key idea behind stacks, queues, maps and sets.
How to derive the running time of a recursive algorithm by writing and solving its recurrence. Applies the Master Theorem to prove why merge sort is O(n log n).
Why speed and memory usually trade against each other, what 'in-place' formally means, and how to decide which resource to spend in a given situation.
Your first data structure: contiguous memory, fixed size, and O(1) access by index. Covers declaration, initialisation, memory layout and why indexing starts at zero.
Extends arrays to grids of rows and columns. Covers declaration, element access with two indices, and how row-major and column-major storage map a grid onto linear memory.
Generalises to three or more dimensions. Covers index arithmetic, memory layout, and realistic uses such as image data and tensors.
The complete operation set for arrays — traverse, search, insert, delete and update — with the cost of each and why insertion and deletion are expensive.
Visiting every element in order. Covers forward and reverse loops, computing running totals, and the O(n) cost of a full pass.
Retrieving an element by position in O(1), why constant-time access is the array's defining advantage, and how to guard against out-of-bounds errors.
Adding an element at the start, end or middle. Shows the element shifting required and why worst-case insertion is O(n).
Removing an element and closing the resulting gap. Covers shifting, updating the logical size, and why deletion is also O(n).
How growable arrays such as ArrayList and vector work internally: capacity doubling, copying on resize, and why appending is amortised O(1) despite occasional expensive copies.
Treats strings as arrays of characters. Covers representation, immutability and its consequences, plus common operations like concatenation, substring and comparison.
Systematic ways to walk a 2D grid: row-wise, column-wise, diagonally and in spiral order. These patterns underpin most matrix interview problems.
Core matrix manipulations: transposing, rotating 90 degrees in place, and searching a row- and column-sorted matrix efficiently.
Maintaining a moving window over an array to avoid recomputation. Covers fixed-size and variable-size windows for subarray sum and substring problems.
Precomputing cumulative sums so any range sum can be answered in O(1). Also covers difference arrays for efficient range updates.
How Many Ways Can a Stack Be Implemented?
Learn the method of converting Infix expressions to Postfix expressions in this comprehensive tutorial. Understand the step-by-step process with examples and implement it in your next data structure project. Master the technique of Infix to Postfix conversion with our easy-to-follow guide.
How Many Ways Can a Queue Be Implemented?
Linked List Program in Java — Step by Step Explanation
Delete a Node from a Linked List in Java — Step by Step Explanation
Traversal in Linked List in Java — Step by Step Explanation
Searching in a Linked List in Java — Step by Step Explanation
Concatenation of Two Linked Lists in Java — Step by Step Explanation
Splitting a Linked List in Java — Step by Step Explanation
Reversal of a Linked List in Java — Complete Explanation
Dictionary in Data Structure
Map in Data Structure
Learn about Graph Data Structure in this comprehensive tutorial. Understand the concepts of vertices, edges, and graph representations, as well as various algorithms for traversing and manipulating graphs such as Breadth-First Search and Depth-First Search. Discover the importance of Graphs in real-world applications and the time and space complexities of different graph algorithms. Enhance your understanding of Graphs and improve your problem-solving skills with this useful tutorial.
Heap sort
Bucket sort
Sign in to save your progress and continue exactly where you left off.