DSA in Java: Complete Step-by-Step Course

DSA in Java: a step-by-step course

34 lessons that take you from the basics of data structures and algorithms to arrays, sorting, recursion, linked lists, stacks, queues, trees, graphs and hashing. Every lesson explains one topic with diagrams and Java programs that have been compiled and run. New lessons are added regularly, so follow them in order.

Start with Lesson 1 →

Part 1 · Foundations

What data structures and algorithms are, the main types, and how to measure how fast and how big a program is. (Lessons 1–4)

1What Are Data Structures and Algorithms?
Why data structures and algorithms matter, with five tested Java programs: contact search, step counting, two ways to sum, stack and queue, and a to-do list.
2Types of Data Structures: Primitive, Linear and Non-Linear
Coming soon
3Time and Space Complexity
Coming soon
4Asymptotic Notation: Big-O, Omega and Theta
Coming soon

Part 2 · Arrays and Strings

Storing data in contiguous memory: arrays, matrices and strings, with practice problems. (Lessons 5–8)

5Arrays: Memory Layout, Traversal, Insertion and Deletion
Coming soon
6Two-Dimensional Arrays and Matrices
Coming soon
7Strings and Character Arrays
Coming soon
8Array Practice Problems
Coming soon

Part 3 · Searching and Sorting

Finding and ordering data, from linear and binary search to merge sort and quick sort. (Lessons 9–14)

9Linear Search
Coming soon
10Binary Search
Coming soon
11Bubble, Selection and Insertion Sort
Coming soon
12Merge Sort
Coming soon
13Quick Sort
Coming soon
14Comparing Sorting Algorithms
Coming soon

Part 4 · Recursion and Backtracking

Solving a problem by calling the same solution on a smaller problem, and backtracking. (Lessons 15–17)

15Recursion Basics and the Call Stack
Coming soon
16Classic Recursion Problems
Coming soon
17Backtracking: Subsets and N-Queens
Coming soon

Part 5 · Linked Lists

Chains of nodes: singly, doubly and circular linked lists. (Lessons 18–21)

18Singly Linked List: Structure and Traversal
Coming soon
19Singly Linked List: Insert, Delete and Search
Coming soon
20Doubly Linked List
Coming soon
21Circular Linked List
Coming soon

Part 6 · Stacks and Queues

Last-in-first-out and first-in-first-out structures, and where they are used. (Lessons 22–26)

22Stack
Coming soon
23Stack Applications: Expression Evaluation
Coming soon
24Queue
Coming soon
25Circular Queue and Deque
Coming soon
26Priority Queue
Coming soon

Part 7 · Trees

Hierarchical data: binary trees, traversals, binary search trees and heaps. (Lessons 27–30)

27Trees and Binary Trees
Coming soon
28Tree Traversals
Coming soon
29Binary Search Tree
Coming soon
30Heaps and Heap Sort
Coming soon

Part 8 · Graphs and Hashing

Networks of connections, searching them with BFS and DFS, and hashing for fast lookup. (Lessons 31–34)

31Graphs: Basics and Representation
Coming soon
32Breadth-First Search
Coming soon
33Depth-First Search
Coming soon
34Hashing and Hash Tables
Coming soon