DSA with Java
Course · DSA · 8 Weeks
A free reading course that teaches data structures and algorithms with Java, the skills that technical interviews test and that keep real programs fast as their data grows. Fourteen chapters start with counting the work a program does and reading Big-O, then cover arrays and ArrayList, searching, the simple sorts, recursion, merge sort and quicksort with Java's own sort, hashing with HashMap and HashSet, linked lists, stacks and queues with ArrayDeque, trees and binary search trees, heaps and PriorityQueue, graphs with BFS and DFS, and greedy algorithms with dynamic programming. The course finishes with a guided project of eight classic interview problems, each solved with a technique from the course and checked against a simple brute-force version on thousands of random inputs. Every program in the course was compiled and run on a real Java 21 installation, and every output and every exception message you see is what Java really printed. Every chapter has clear explanations, common mistakes and practice exercises. Chapters 1 to 13 also have multiple-choice questions you answer as you read and a practice assignment each, and the course ends with a full answer key. You need to know basic Java first: finish the free Java Beginner course, or be comfortable with loops, arrays, ArrayList, methods, classes and HashMap. You read at your own pace and type the code yourself.
Program fee: ₹0 (excl. GST). Certificate on completion, tied to a verifiable Intern ID.
Learning Roadmap
- Weeks 1-3: Counting and searching: Count the work a program does and read Big-O, learn what each array and ArrayList operation costs, write binary search without off-by-one or overflow bugs, and trace bubble, selection and insertion sort.
- Weeks 4-6: Core tools: Write recursive methods with a clear base case, learn merge sort, quicksort and Java's own sort with Comparable and Comparator, then use hashing, linked lists, stacks and queues to solve problems in one pass.
- Weeks 7-8: Trees, graphs and a project: Build binary search trees and heaps, explore graphs with BFS and DFS, meet greedy methods and dynamic programming, and finish by solving eight interview-style problems with a stated cost for each.
Syllabus — What You'll Learn
- Why DSA Matters, and Counting the Work (Big-O): data structures, algorithms, counting steps, O(1), O(n), O(n²), O(log n)
- Arrays and ArrayList: the cost of each operation, amortised growth, two pointers, sliding window, prefix sums, grids
- Searching: linear search, binary search, the mid overflow bug, Arrays.binarySearch, binary search on an answer
- Bubble, Selection and Insertion Sort: tracing, counting comparisons, stability
- Recursion: base case and recursive case, the call stack, Fibonacci, fast power, Tower of Hanoi, backtracking
- Merge Sort, Quicksort and Java's Own Sort: divide and conquer, the pivot, Arrays.sort, Comparable and Comparator
- Hashing: how a hash table works, collisions, HashMap and HashSet patterns, equals and hashCode, two-sum
- Linked Lists: nodes, inserting and deleting, reversing, fast and slow pointers, a dummy head
- Stacks and Queues: ArrayDeque, bracket matching, postfix, the next bigger item, a queue from two stacks, round-robin
- Trees and Binary Search Trees: tree walks, insert, search, delete, checking a BST, TreeMap and TreeSet
- Heaps and Priority Queues: sift up and down, PriorityQueue, heap sort, the k largest items, a running median
- Graphs, BFS and DFS: adjacency lists, shortest paths, connected components, mazes, topological sort, a first look at Dijkstra
- Greedy Algorithms and Dynamic Programming: choosing meetings, why greedy can fail, memoisation, tabulation, coin change, longest common subsequence
- Final Project: eight interview-style problems solved and checked against brute force
- Answer Key: worked answers to all the chapter exercises, run on real Java 21
Career Opportunities
- Software Engineer (the first step in preparing for coding interviews)
- SDE Interview Candidate (the topics asked about most often, with practice problems)
- Java Developer (faster code through the right data structure)
- Competitive Programming beginner (a base for contest problems)
- Computer Science student (a clear companion to a college DSA course)