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)
Part 2 · Arrays and Strings
Storing data in contiguous memory: arrays, matrices and strings, with practice problems. (Lessons 5–8)
Part 3 · Searching and Sorting
Finding and ordering data, from linear and binary search to merge sort and quick sort. (Lessons 9–14)
Part 4 · Recursion and Backtracking
Solving a problem by calling the same solution on a smaller problem, and backtracking. (Lessons 15–17)
Part 5 · Linked Lists
Chains of nodes: singly, doubly and circular linked lists. (Lessons 18–21)
Part 6 · Stacks and Queues
Last-in-first-out and first-in-first-out structures, and where they are used. (Lessons 22–26)
Part 7 · Trees
Hierarchical data: binary trees, traversals, binary search trees and heaps. (Lessons 27–30)
Part 8 · Graphs and Hashing
Networks of connections, searching them with BFS and DFS, and hashing for fast lookup. (Lessons 31–34)