Searching, sorting, recursion, trees and graphs: these articles explain the algorithms and data structures of a typical second programming course, each with runnable Java code.
- SearchingLinear and binary search in Java explained simply: with code examples, O(n) and O(log n) running times and the typical mistakes made in exams.Read article
- Simple sortingBubble sort, selection sort and insertion sort in Java, step by step: with examples, running time, stability and the typical mistakes to avoid.Read article
- Fast sortingMerge sort, quicksort and counting sort in Java explained simply: with example code, running time, stability and the typical mistakes in exams.Read article
- Classic algorithmsGCD with Euclid, prime sieve, number systems, Luhn and greedy change in Java: short examples, running times and typical mistakes for your exam.Read article
- Lists, stacks, queuesBuild a stack, a queue and a linked list in Java yourself: examples with an array, a ring buffer and nodes, running times and typical mistakes.Read article
- Recursion and backtrackingRecursion and backtracking in Java explained simply: base case, call stack, permutations and Towers of Hanoi with examples and typical mistakes.Read article
- Trees and heapsBinary trees, binary search trees, heaps and heapsort in Java explained simply: traversal, examples and the typical mistakes made in exams.Read article
- Hashing and graphsHash tables, breadth-first search, depth-first search and Dijkstra in Java explained simply: with example code, running times and typical mistakes.Read article