Two Pointers
A technique that uses two indices to traverse arrays or strings efficiently, reducing time complexity from O(n²) to O(n) in many problems.
Two pointers start from opposite ends and move inward, commonly used for pair sum and container problems.
Both pointers move forward together, commonly used for in-place array modifications like removing duplicates or shifting elements.
Uses two pointers moving at different speeds to detect cycles or find midpoints in linked lists.