Sliding Window Technique
Optimize nested loops by converting O(N^2) algorithms to linear O(N) using a sliding window.
Jul 2, 20261 min read
Search for a command to run...
Articles tagged with #algorithms
Optimize nested loops by converting O(N^2) algorithms to linear O(N) using a sliding window.
Learn how to iterate over a data structure using two independent indices to solve problems efficiently.
Master graph partitioning by deriving and implementing Tarjan's linear-time SCC algorithm in Java.
Master range queries and dynamic updates using Segment Trees and Binary Indexed Trees in Java.
Master the core algorithms that power LLM token filtering, agent dependency planning, and hybrid search retrieval.
How stochastic averaging over leading-zero bit runs estimates cardinality to ±0.81% using 12 KB of memory regardless of dataset size.
