Data Structures & Algorithms Primer

Kotlin Edition — Visual Reference Collection
[ ]
Arrays
Memory model, Kotlin array types, core operations, sorting algorithms, and 15 algorithm patterns with visual diagrams, complexity tags, and hover explanations.
IntArray MutableList 2D Matrix 10 Sorts
" "
Strings
Immutability & memory, string pool, creation & comparison, transformation, splitting & joining, StringBuilder, regex, character arithmetic, and KMP/Rabin-Karp string matching.
String StringBuilder Regex KMP
#{ }
HashMaps
HashMap concepts, hashing internals, collision resolution, Kotlin map types, core operations, sorted maps, frequency counting, two-sum, sliding window, caching, and LRU cache.
HashMap LinkedHashMap TreeMap LRU Cache
Sets
Set concepts, Kotlin set types, creation & mutation, set algebra (union, intersect, difference), sorted sets, duplicate detection, consecutive sequence, and first unique element.
HashSet LinkedHashSet TreeSet Set Algebra
Linked Lists
Singly & doubly linked lists, sentinel nodes, fast/slow pointers, reversal, cycle detection, merge sorted lists, partition, rotate, k-group reverse, and LRU cache.
ListNode DoublyLinked Floyd's 19 Algos
Stacks
LIFO fundamentals, ArrayDeque, monotonic stacks, bracket matching, expression evaluation, histogram, rain water, DFS, tree traversals, and 19 algorithm patterns.
ArrayDeque Monotonic LIFO 19 Algos
Queues
FIFO fundamentals, deques, priority queues (heaps), BFS, level-order traversal, monotonic deque, Dijkstra's, sliding window max/min, two-heap median, and 20 algorithm patterns.
ArrayDeque PriorityQueue BFS 20 Algos
Trees
Binary trees, BST operations & validation, AVL & Red-Black trees, all traversals, tries, segment trees, Fenwick trees, and 24 algorithm patterns.
BST Trie Traversals 24 Algos
Graphs
Graph representations, BFS/DFS traversals, shortest paths (Dijkstra, Bellman-Ford, Floyd-Warshall), MSTs (Kruskal, Prim), Union-Find, topological sort, and 35 algorithm patterns.
Adjacency List Dijkstra Union-Find 35 Algos
Dynamic Programming
Memoization vs tabulation, 1D & 2D DP, knapsack, LCS, edit distance, interval DP, bitmask DP, state machine patterns, and 30+ algorithm patterns.
Knapsack LCS State Machine 30+ Algos
Recursion & Backtracking
Call stack, tail recursion, divide-and-conquer, memoization, backtracking templates, subsets, permutations, combinations, N-Queens, Sudoku, and 20+ patterns.
Backtracking D&C Memoization 20+ Algos
𝒪
Big O & Complexity
Asymptotic notation, all complexity classes from O(1) to O(n!), analyzing loops & recursion, Master Theorem, amortized analysis, practical limits, and Kotlin/JVM library complexities.
Big O Master Theorem Amortized 30 Sections