Two Pointers: When Should They Cross, Stay, or Skip?
Many two-pointer bugs hide in one line: the loop condition. Here's how to get it right every time.
Tag archive
Many two-pointer bugs hide in one line: the loop condition. Here's how to get it right every time.
Don't just memorize 'fast moves 2 steps'. Learn to explain the math and intuition behind Floyd's Cycle Detection in plain English.
Left++? Right++? Stop randomly moving pointers. Learn the specific 'Expand vs. Contract' invariant that explains every sliding window problem.
You know two pointers is faster, but the mental leap from nested loops feels chaotic. Here's a repeatable playbook.
Two pointers show up everywhere on LeetCode, but many beginners memorize patterns without understanding why they work. This guide builds your intui...
Confused between Sliding Window and Two Pointers? Learn the exact decision framework to pick the right pattern for array and string problems instan...
Three pointers is confusing. Learn the specific 'Partition Invariant' that makes this problem impossible to forget.
Two Pointers and Sliding Window are powerful algorithmic techniques that optimize array and string...
🎀 The Problem Given an integer array nums sorted in non-decreasing order, remove the...
Movendo todos números 5 para o fim de um array

The Two Pointers Technique is a technique that allows you to optimize your runtime (time complexity...
I wrote couple of posts previously here and here on how to find duplicates in a...