Problem library
Two Pointers
All problems that are about two pointers.
31
/ 31 problems
| Problem | Category | Time | Solved |
|---|---|---|---|
|
Find the celebrity
two-pointers
|
O(n) | Jan 17, 2023 | |
|
Most profit assigning work
greedy
two-pointers
|
O(nlog(n)) | Jan 6, 2023 | |
|
Minimum number of moves to make palindrome
two-pointers
|
O(n^2) | Dec 25, 2022 | |
|
Take k of each character from left and right
array-and-hashmap
two-pointers
|
O(n) | Dec 25, 2022 | |
|
Longest mountain in array
two-pointers
|
O(n) | Dec 20, 2022 | |
|
Valid palindrome IV
array-and-hashmap
two-pointers
|
O(n) | Dec 10, 2022 | |
|
Longest subarray of 1s after deleting one element
two-pointers
|
O(n) | Nov 29, 2022 | |
|
Boats to save people
two-pointers
|
O(nlog(n)) | Nov 22, 2022 | |
|
Sort colors
two-pointers
array-and-hashmap
|
O(n) | Nov 22, 2022 | |
|
Camelcase matching
two-pointers
queue
|
O(n) | Nov 21, 2022 | |
|
Shortest subarray to be removed to make array sorted
two-pointers
|
O(n) | Nov 16, 2022 | |
|
Number of subarrays with bounded maximum
two-pointers
|
O(n) | Nov 13, 2022 | |
|
Array with elements not equal to average of neighbors
two-pointers
|
O(nlogn) | Nov 7, 2022 | |
|
Number of subsequences that satisfy the given sum condition
two-pointers
|
O(nlogn) | Nov 7, 2022 | |
|
Is subsequence
two-pointers
|
O(n) | Oct 6, 2022 | |
|
Length of last word
two-pointers
|
O(n) | Oct 6, 2022 | |
|
Move zeroes
two-pointers
|
O(n) | Oct 2, 2022 | |
|
Rotate array
two-pointers
|
O(n) | Oct 2, 2022 | |
|
Merge sorted array
two-pointers
|
O(n) | Oct 1, 2022 | |
|
Reverse string
two-pointers
|
O(n) | Oct 1, 2022 | |
|
Valid palindrome II
two-pointers
|
O(n) | Oct 1, 2022 | |
|
Push dominoes
two-pointers
|
O(n^2) | Sep 27, 2022 | |
|
Reverse string II
two-pointers
|
O(n) | Sep 27, 2022 | |
|
Bag of tokens
two-pointers
|
O(nlog(n)) | Sep 12, 2022 | |
|
Build an array with stack operations
two-pointers
|
O(n) | Sep 8, 2022 | |
|
Compare version numbers
two-pointers
|
O(n) | Aug 25, 2022 | |
|
Trapping rain water
two-pointers
|
O(n) | Jul 25, 2022 | |
|
3Sum
two-pointers
|
O(n^2) | Jul 23, 2022 | |
|
Container with most water
two-pointers
|
O(n) | Jul 15, 2022 | |
|
Two sum II - input array is sorted
two-pointers
|
O(n) | Jul 14, 2022 | |
|
Valid palindrome
two-pointers
|
O(n) | Jul 13, 2022 |
No matching problems
Try clearing one of the filters.