> For the complete documentation index, see [llms.txt](https://protegejj.gitbook.io/oj-practices/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers.md).

# Two Pointers

- [3 Longest Substring Without Repeating Characters](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/3-longest-substring-without-repeating-characters.md)
- [11 Container With Most Water](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/11-container-with-most-water.md)
- [15 3Sum](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/15-3sum.md)
- [16     3Sum Closest](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/16-3sum-closest.md)
- [18     4Sum](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/18-4sum.md)
- [26     Remove Duplicates from Sorted Array](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/26-remove-duplicates-from-sorted-array.md)
- [27     Remove Element](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/27-removeelement.md)
- [30     Substring with Concatenation of All Words](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/30-substring-with-concatenation-of-all-words.md)
- [42     Trapping Rain Water](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/42-trapping-rain-water.md)
- [76 Minimum Window Substring](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/76-minimum-window-substring.md)
- [80     Remove Duplicates from Sorted Array II](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/80-remove-duplicates-from-sorted-array-ii.md)
- [88     Merge Sorted Array](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/88-merge-sorted-array.md)
- [125     Valid Palindrome](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/125-valid-palindrome.md)
- [159     Longest Substring with At Most Two Distinct Characters](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/159-longest-substring-with-atmost-two-distinct-characters.md)
- [167     Two Sum II - Input array is sorted](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/167-two-sum-ii-input-array-is-sorted.md)
- [202     Happy Number](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/202-happy-number.md)
- [209     Minimum Size Subarray Sum](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/209-minimum-size-subarray-sum.md)
- [259     3Sum Smaller](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/259-3sum-smaller.md)
- [283     Move Zeroes](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/283-move-zeroes.md)
- [287     Find the Duplicate Number](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/287-find-the-duplicate-number.md)
- [340     Longest Substring with At Most K Distinct Characters](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/340-longest-substring-with-atmost-k-distinct-characters.md)
- [344     Reverse String](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/344-reverse-string.md)
- [345     Reverse Vowels of a String](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/345-reverse-vowels-of-a-string.md)
- [349     Intersection of Two Arrays](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/349-intersection-of-two-arrays.md)
- [350     Intersection of Two Arrays II](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/350-intersection-of-two-arrays-ii.md)
- [360     Sort Transformed Array](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/360-sort-transformed-array.md)
- [395     Longest Substring with At Least K Repeating Characters](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/395-longest-substring-with-atleast-k-repeating-characters.md)
- [424     Longest Repeating Character Replacement](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/424-longest-repeating-character-replacement.md)
- [438     Find All Anagrams in a String](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/438-find-all-anagrams-in-a-string.md)
- [487     Max Consecutive Ones II](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/487-max-consecutive-ones-ii.md)
- [524     Longest Word in Dictionary through Deleting](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/524-longest-word-in-dictionary-through-deleting.md)
- [532     K-diff Pairs in an Array](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/532-k-diff-pairs-in-an-array.md)
- [567     Permutation in String](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/567-permutation-in-string.md)
- [611     Valid Triangle Number](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/611-valid-triangle-number.md)
- [632     Smallest Range](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/632-smallest-range.md)
- [713     Subarray Product Less Than K](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/713-subarray-product-less-than-k.md)
- [723     Candy Crush](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/723-candy-crush.md)
- [763     Partition Labels](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/763-partition-labels.md)
- [826 Most Profit Assigning Work](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/826-most-profit-assigning-work.md)
- [828 Unique Letter String](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/828-unique-letter-string.md)
- [838     Push Dominoes](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/838-push-dominoes.md)
- [844     Backspace String Compare](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/844-backspace-string-compare.md)
- [845     Longest Mountain in Array](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/845-longest-mountain-in-array.md)
- [881     Boats to Save People](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/881-boats-to-save-people.md)
- [904     Fruit Into Baskets](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/904-fruit-into-baskets.md)
- [457 Circular Array Loop](https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers/457-circular-array-loop.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://protegejj.gitbook.io/oj-practices/chapter1/two-pointers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
