Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 1.62 KB

File metadata and controls

35 lines (21 loc) · 1.62 KB

Two Pointers

Theory

Two Pointers

  • Two pointers is a technique where you use two pointers that either move towards each other or away from each other.

Two Pointers Applications

  • Two pointers is used when you need to find a set of elements that fulfill certain constraints.

Two Pointers Implementation

  • Using two variables.

Two Pointers Time Complexity

  • O(n)

Two Pointers Space Complexity

  • O(1)

Problems

Category: Two Pointers Status: Done Author: David Bujosa