Post

Array Leetcode Patterns

Array Leetcode Patterns

Array Leetcode Patterns

1. Two Pointers

This pattern is used to solve problems that involve searching for pairs in a sorted array.

2. Sliding Window

This pattern is used to solve problems that involve finding a subarray or substring that satisfies a certain condition.

3. Prefix Sum

This pattern is used to solve problems that involve finding the sum of a subarray.

This post is licensed under CC BY 4.0 by the author.