Algorithms Jul 1, 2026 4 min read
Prefix Sum Algorithm Explained
Learn prefix sums with Java examples, range-sum queries, subarray patterns, difference arrays, complexity, and when preprocessing is worth it.
Tag
7 articles with this tag.
Algorithms Jul 1, 2026 4 min read
Learn prefix sums with Java examples, range-sum queries, subarray patterns, difference arrays, complexity, and when preprocessing is worth it.
Algorithms Jul 1, 2026 5 min read
Learn the sliding window algorithm pattern with Java examples, fixed windows, variable windows, two pointers, complexity, and common mistakes.
Algorithms Jul 1, 2026 5 min read
Learn the two pointers algorithm pattern with Java examples for sorted arrays, pairs, partitions, linked lists, complexity, and common mistakes.
Algorithms Jun 28, 2026 4 min read
Learn how binary search works, when it applies, common off-by-one mistakes, and how to implement iterative binary search in Java.
Algorithms Jun 28, 2026 4 min read
Learn common ways to solve top K elements problems with sorting, heaps, and Java PriorityQueue, including complexity tradeoffs.
Algorithms Feb 4, 2026 4 min read
Learn Big-O notation with practical backend examples, including arrays, hash maps, sorting, nested loops, and database-like thinking.
Java Jan 14, 2026 4 min read
Learn how Java PriorityQueue works, when to use it, how ordering is defined, and common pitfalls around iteration and custom comparators.