Skip to main content

10 docs tagged with "Two Pointers"

View all tags

3Sum

Given an array of integers, find all unique triplets that sum to zero.

3Sum Closest

Given an array of integers, find three distinct numbers whose sum is as close as possible to a given target value.

4Sum

Find all unique quadruplets in a given array of integers that sum up to a specific target value.

Container With Most Water

Given an array representing the heights of vertical lines, find two lines that, along with the x-axis, form a container holding the…

Linked List Cycle

Given the head of a linked list, determine if there's a cycle present.

Product Of Array Except Self

Compute the product of all elements in an array except for the element at the current index, without using division.

Two Sum

Given an array of integers and a target integer, find the indices of two numbers that add up to the target.

Valid Palindrome

Determine if a given string is a palindrome after converting all uppercase letters to lowercase and removing all non-alphanumeric…