Mastering Data Structures & Algorithms in Java
Go from writing code to writing efficient code. Master every core data structure and algorithm in Java — complexity analysis, arrays, recursion, linked lists, trees, graphs, and dynamic programming — the CS foundations that power technical interviews. Self-paced, with cheat sheets, summaries, coding assignments, and chapter quizzes.
What you'll learn
- Time and space complexity — Big O analysis from the ground up
- Core structures: arrays, linked lists, stacks, queues, trees, heaps, hash tables
- Recursion, backtracking, and divide-and-conquer
- Graph algorithms: BFS, DFS, Dijkstra, and minimum spanning trees
- Dynamic programming: memoization and tabulation
- The Java Collections Framework, inside and out
Before you start
- Basic to intermediate Java (syntax, classes, methods)
- Comfort with loops, conditionals, and functions
- High-school maths — no prior DSA experience required
What you'll get
- Analyze any algorithm's time and space complexity
- Implement every core data structure from scratch in Java
- Solve interview-style problems with confidence
- A certificate of completion
What's included
Curriculum
11 chapters · 70 lessonsIntroduction and Complexity Analysis
2 HoursBridges the gap between writing code and writing efficient code, focusing on the mathematical foundations for performance.
- 1.1Course Introduction and Setup Watch free
- 1.2What are Data Structures and Algorithms? Watch free
- 1.3Memory Management in Java (Heap vs. Stack) Watch free
- 1.4Introduction to Asymptotic Analysis Watch free
- 1.5Time Complexity and Big O Notation (O(1), O(n), O(n²)) Watch free
- 1.6Space Complexity Analysis
- 1.7Best, Worst, and Average Case Scenarios
Java Collections Framework Primer
2 HoursA rapid review of Java's built-in data structures to establish a baseline before building custom implementations.
- 2.1Introduction to Generics in Java
- 2.2The Iterable and Collection Interfaces
- 2.3Working with the List Interface (ArrayList, LinkedList)
- 2.4Working with the Set Interface (HashSet, TreeSet)
- 2.5Working with the Map Interface (HashMap, TreeMap)
- 2.6The Collections Utility Class
Arrays and Strings
2.5 HoursContiguous memory structures, pointers, and essential string manipulation techniques common in computer science.
- 3.11D and 2D Arrays in Memory
- 3.2Dynamic Arrays: Building a Custom ArrayList
- 3.3Two-Pointer Technique
- 3.4Sliding Window Technique
- 3.5Java String, StringBuilder, and StringBuffer
- 3.6String Matching Algorithms (Naive Approach)
Recursion and Backtracking
3 HoursTeaches you how to think recursively and solve complex optimization or search problems.
- 4.1The Anatomy of a Recursive Function
- 4.2Call Stack and Stack Overflow Exceptions
- 4.3Tail Recursion
- 4.4Divide and Conquer Paradigm
- 4.5Introduction to Backtracking
- 4.6Solving the N-Queens Problem
- 4.7Generating Permutations and Combinations
Linked Lists
2.5 HoursNode-based, non-contiguous data structures and pointer manipulation.
- 5.1Singly Linked Lists: Implementation and Traversal
- 5.2Doubly Linked Lists
- 5.3Circular Linked Lists
- 5.4Reversing a Linked List
- 5.5Fast and Slow Pointer Technique (Floyd's Cycle Finding)
- 5.6Merging and Sorting Linked Lists
Stacks and Queues
2.5 HoursLast-In-First-Out (LIFO) and First-In-First-Out (FIFO) structures and their practical computing applications.
- 6.1Stack Implementation using Arrays and Linked Lists
- 6.2Valid Parentheses and Expression Parsing
- 6.3Queue Implementation using Arrays and Linked Lists
- 6.4Circular Queues
- 6.5Double-Ended Queues (Deques)
- 6.6Monotonic Stacks
Trees and Binary Search Trees
3.5 HoursHierarchical data and efficient searching structures.
- 7.1Tree Terminology and Properties
- 7.2Binary Trees and Representation
- 7.3Tree Traversals (Inorder, Preorder, Postorder)
- 7.4Level-Order Traversal (Breadth-First Search)
- 7.5Binary Search Tree (BST) Implementation
- 7.6Insertion, Deletion, and Searching in a BST
- 7.7Introduction to Balanced Trees (AVL and Red-Black Trees Concept)
Heaps and Priority Queues
2 HoursBinary heaps and their application in scheduling and fast access to minimum/maximum elements.
- 8.1Properties of a Binary Heap
- 8.2Min-Heap vs. Max-Heap Implementation
- 8.3Heapify Operation and Heap Sort
- 8.4Java's PriorityQueue Class
- 8.5Solving Top-K Problems
Hash Tables and Maps
2.5 HoursHashing functions, memory mapping, and handling data collisions for O(1) average time complexity.
- 9.1Understanding Hashing and Hash Functions
- 9.2Collision Resolution: Chaining
- 9.3Collision Resolution: Open Addressing (Linear Probing)
- 9.4Load Factor and Rehashing
- 9.5Designing a Custom HashMap
- 9.6Using Hash Sets for Duplicates and Intersections
Graphs and Graph Algorithms
4 HoursThe most comprehensive chapter — networks, paths, and complex relational data.
- 10.1Graph Terminology (Directed, Undirected, Weighted)
- 10.2Adjacency Matrix vs. Adjacency List Representation
- 10.3Breadth-First Search (BFS) in Graphs
- 10.4Depth-First Search (DFS) in Graphs
- 10.5Cycle Detection (Directed and Undirected)
- 10.6Topological Sorting
- 10.7Dijkstra's Shortest Path Algorithm
- 10.8Minimum Spanning Trees (Kruskal's or Prim's Algorithm)
Dynamic Programming
3.5 HoursOptimize recursive algorithms by storing overlapping subproblems.
- 11.1Memoization (Top-Down Approach)
- 11.2Tabulation (Bottom-Up Approach)
- 11.31D Dynamic Programming (e.g., Fibonacci, Climbing Stairs)
- 11.42D Dynamic Programming (e.g., Grid Paths)
- 11.5The 0/1 Knapsack Problem
- 11.6Longest Common Subsequence