Skip to content

Latest commit

 

History

History
11 lines (9 loc) · 588 Bytes

Two-Pointer Technique.md

File metadata and controls

11 lines (9 loc) · 588 Bytes
tags
Array
  1. The Two-Pointer Technique is a common and powerful strategy used in array problems, especially those involving sorted arrays.
  2. The idea is to use two pointers that iterate through the array from different positions (often from the start and end), processing elements while moving the pointers towards each other based on certain conditions

Finding Pairs with a Given Sum

  1. In this type of problem, we are often asked to find two numbers in an array that add up to a specific target sum. This can be done efficiently if the array is sorted.