GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

No menu could be recovered. Follow the blue links in the page.

This view

  • Original page
  • New address

GeezerVison is showing leetcodejavascript.com — Two Pointers LeetCode Problems | JavaScript Solutions

Two Pointers | LeetCode Problems

200 Two Pointers solutions to LeetCode solutions.

View Source Code on GitHub
All 2765 Array 1587 String 683 Hash Table 587 Math 485 Dynamic Programming 458 Sorting 384 Greedy 348 Depth-First Search 293 Binary Search 241 Tree 227 Breadth-First Search 224 Matrix 223 Two Pointers 200 Bit Manipulation 197 Binary Tree 175 Prefix Sum 159 Stack 154 Heap Priority Queue 152 Simulation 150 Counting 134 Graph 133 Design 123 Sliding Window 112 Backtracking 104 Union Find 79 Enumeration 78 Linked List 78 Ordered Set 60 Monotonic Stack 55 Trie 51 Number Theory 47 Divide and Conquer 46 Recursion 45 Bitmask 41 Queue 41 Binary Search Tree 40 Segment Tree 38 Memoization 36 Geometry 36 Combinatorics 35 Topological Sort 33 Hash Function 30 Binary Indexed Tree 28 Game Theory 26 String Matching 23 Shortest Path 23 Interactive 23 Rolling Hash 22 Data Stream 20 Brainteaser 16 Monotonic Queue 14 Randomized 12 Merge Sort 12 Doubly-Linked List 11 Counting Sort 10 Iterator 9 Probability and Statistics 7 Quickselect 7 Suffix Array 6 Bucket Sort 6 Line Sweep 5 Minimum Spanning Tree 5 Reservoir Sampling 4 Strongly Connected Component 3 Eulerian Circuit 3 Radix Sort 3 Rejection Sampling 2 Biconnected Component 1

Two Pointers Problems View all solutions →

Longest Palindromic Substring

#5 Medium

Container With Most Water

#11 Medium

3Sum

#15 Medium

3Sum Closest

#16 Medium

4Sum

#18 Medium

Remove Nth Node From End of List

#19 Medium

Remove Duplicates from Sorted Array

#26 Easy

Remove Element

#27 Easy

Implement strStr()

#28 Easy

Next Permutation

#31 Medium

Trapping Rain Water

#42 Hard

Rotate List

#61 Medium

Sort Colors

#75 Medium

Remove Duplicates from Sorted Array II

#80 Medium

Remove Duplicates from Sorted List II

#82 Medium

Partition List

#86 Medium

Merge Sorted Array

#88 Easy

Valid Palindrome

#125 Easy

Linked List Cycle

#141 Easy

Linked List Cycle II

#142 Medium

Reorder List

#143 Medium

Sort List

#148 Medium

Reverse Words in a String

#151 Medium

Intersection of Two Linked Lists

#160 Medium

One Edit Distance

#161 Medium

Compare Version Numbers

#165 Medium

Two Sum II - Input Array Is Sorted

#167 Easy

Two Sum III - Data structure design

#170 Easy

Reverse Words in a String II

#186 Medium

Rotate Array

#189 Medium

Happy Number

#202 Easy

Palindrome Linked List

#234 Easy

Shortest Word Distance II

#244 Medium

Strobogrammatic Number

#246 Easy

Flatten 2D Vector

#251 Medium

Meeting Rooms II

#253 Medium

3Sum Smaller

#259 Medium

Closest Binary Search Tree Value II

#272 Hard

Find the Celebrity

#277 Medium

Move Zeroes

#283 Easy

Find the Duplicate Number

#287 Medium

Find Median from Data Stream

#295 Hard

Create Maximum Number

#321 Hard

Reverse String

#344 Easy

Reverse Vowels of a String

#345 Easy

Intersection of Two Arrays

#349 Easy

Intersection of Two Arrays II

#350 Easy

Sort Transformed Array

#360 Medium

Is Subsequence

#392 Easy

Valid Word Abbreviation

#408 Easy

String Compression

#443 Medium

Assign Cookies

#455 Easy

Circular Array Loop

#457 Medium

Heaters

#475 Medium

Magical String

#481 Medium

Longest Uncommon Subsequence II

#522 Medium

Longest Word in Dictionary through Deleting

#524 Medium

K-diff Pairs in an Array

#532 Medium

Reverse String II

#541 Easy

Next Greater Element III

#556 Medium

Reverse Words in a String III

#557 Easy

Permutation in String

#567 Medium

Shortest Unsorted Continuous Subarray

#581 Medium

Valid Triangle Number

#611 Medium

Sum of Square Numbers

#633 Medium

Palindromic Substrings

#647 Medium

Two Sum IV - Input is a BST

#653 Easy

Find K Closest Elements

#658 Medium

Valid Palindrome II

#680 Easy

Count Binary Substrings

#696 Easy

Find K-th Smallest Pair Distance

#719 Hard

Candy Crush

#723 Medium

Partition Labels

#763 Medium

Swap Adjacent in LR String

#777 Medium

K-th Smallest Prime Fraction

#786 Medium

Number of Subarrays with Bounded Maximum

#795 Medium

Expressive Words

#809 Medium

Shortest Distance to a Character

#821 Easy

Friends Of Appropriate Ages

#825 Medium

Most Profit Assigning Work

#826 Medium

Flipping an Image

#832 Easy

Push Dominoes

#838 Medium

Backspace String Compare

#844 Easy

Longest Mountain in Array

#845 Medium

Advantage Shuffle

#870 Medium

Middle of the Linked List

#876 Easy

Boats to Save People

#881 Medium

Sort Array By Parity

#905 Easy

Reverse Only Letters

#917 Easy

Sort Array By Parity II

#922 Easy

3Sum With Multiplicity

#923 Medium

Long Pressed Name

#925 Easy

DI String Match

#942 Easy

Bag of Tokens

#948 Medium

Maximum Width Ramp

#962 Medium

Pancake Sorting

#969 Medium

Squares of a Sorted Array

#977 Easy

Interval List Intersections

#986 Medium

Camelcase Matching

#1023 Medium

Moving Stones Until Consecutive II

#1040 Medium

Longest String Chain

#1048 Medium

Shortest Way to Form String

#1055 Medium

Duplicate Zeros

#1089 Easy

Two Sum Less Than K

#1099 Easy

Longest Chunked Palindrome Decomposition

#1147 Hard

Last Substring in Lexicographical Order

#1163 Hard

Two Sum BSTs

#1214 Medium

Meeting Scheduler

#1229 Medium

Find Positive Integer Solution for a Given Equation

#1237 Medium

Print Immutable Linked List in Reverse

#1265 Medium

Remove Palindromic Subsequences

#1332 Easy

Check If N and Its Double Exist

#1346 Easy

Find the Distance Value Between Two Arrays

#1385 Easy

Check If a Word Occurs As a Prefix of Any Word in a Sentence

#1455 Easy

The k Strongest Values in an Array

#1471 Medium

Number of Subsequences That Satisfy the Given Sum Condition

#1498 Medium

Range Sum of Sorted Subarray Sums

#1508 Medium

Get the Maximum Score

#1537 Hard

Dot Product of Two Sparse Vectors

#1570 Medium

Shortest Subarray to be Removed to Make Array Sorted

#1574 Medium

Number of Ways Where Square of Number Is Equal to Product of Two Numbers

#1577 Medium

Split Two Strings to Make Palindrome

#1616 Medium

Add Two Polynomials Represented as Linked Lists

#1634 Medium

Lowest Common Ancestor of a Binary Tree III

#1650 Medium

Max Number of K-Sum Pairs

#1679 Medium

Checking Existence of Edge Length Limited Paths

#1697 Hard

Ways to Split Array Into Three Subarrays

#1712 Medium

Swapping Nodes in a Linked List

#1721 Medium

Minimum Length of String After Deleting Similar Ends

#1750 Medium

Largest Merge Of Two Strings

#1754 Medium

Closest Subsequence Sum

#1755 Hard

Form Array by Concatenating Subarrays of Another Array

#1764 Medium

Merge Strings Alternately

#1768 Easy

Count Pairs Of Nodes

#1782 Hard

Maximum Score of a Good Subarray

#1793 Hard

Sentence Similarity III

#1813 Medium

Faulty Sensor

#1826 Easy

Next Palindrome Using Same Digits

#1842 Hard

Minimum Adjacent Swaps to Reach the Kth Smallest Number

#1850 Medium

Maximum Distance Between a Pair of Values

#1855 Medium

Rotating the Box

#1861 Medium

Product of Two Run-Length Encoded Arrays

#1868 Medium

Minimize Maximum Pair Sum in Array

#1877 Medium

Count Pairs in Two Arrays

#1885 Medium

Maximum Number of Removable Characters

#1898 Medium

Check If String Is a Prefix of Array

#1961 Easy

Minimum Number of Swaps to Make the String Balanced

#1963 Medium

Reverse Prefix of Word

#2000 Easy

Partition Array Into Two Arrays to Minimize Sum Difference

#2035 Hard

Sort Linked List Already Sorted Using Absolute Values

#2046 Medium

Delete the Middle Node of a Linked List

#2095 Medium

Watering Plants II

#2105 Medium

Find First Palindromic String in the Array

#2108 Easy

Adding Spaces to a String

#2109 Medium

Recover the Original Array

#2122 Hard

Maximum Twin Sum of a Linked List

#2130 Medium

Rearrange Array Elements by Sign

#2149 Medium

Partition Array According to Given Pivot

#2161 Medium

Minimum Number of Moves to Make Palindrome

#2193 Hard

Find All K-Distant Indices in an Array

#2200 Easy

Maximum Total Beauty of the Gardens

#2234 Hard

Successful Pairs of Spells and Potions

#2300 Medium

Valid Palindrome IV

#2330 Medium

The Latest Time to Catch a Bus

#2332 Medium

Move Pieces to Obtain a String

#2337 Medium

Number of Arithmetic Triplets

#2367 Easy

Strictly Palindromic Number

#2396 Medium

Divide Intervals Into Minimum Number of Groups

#2406 Medium

Maximum Matching of Players With Trainers

#2410 Medium

Merge Operations to Turn Array Into a Palindrome

#2422 Medium

Largest Positive Integer That Exists With Its Negative

#2441 Easy

Apply Operations to an Array

#2460 Easy

Total Cost to Hire K Workers

#2462 Medium

Number of Distinct Averages

#2465 Easy

Maximum Number of Non-overlapping Palindrome Substrings

#2472 Hard

Append Characters to String to Make Subsequence

#2486 Medium

Divide Players Into Teams of Equal Skill

#2491 Medium

Maximum Number of Points From Grid Queries

#2503 Hard

Maximum Enemy Forts That Can Be Captured

#2511 Easy

Minimum Common Value

#2540 Easy

Find the Array Concatenation Value

#2562 Easy

Count the Number of Fair Pairs

#2563 Medium

Merge Two 2D Arrays by Summing Values

#2570 Easy

Find the Maximum Number of Marked Indices

#2576 Medium

Maximize Greatness of an Array

#2592 Medium

Minimum Time to Eat All Grains

#2604 Hard

Split a Circular Linked List

#2674 Medium

Lexicographically Smallest Palindrome

#2697 Easy

Count Pairs Whose Sum is Less than Target

#2824 Easy

Make String a Subsequence Using Cyclic Increments

#2825 Medium

Maximum Coins Heroes Can Collect

#2838 Medium

The Wording Game

#2868 Hard

Find Indices With Index and Value Difference I

#2903 Easy

Separate Black and White Balls

#2938 Medium

Count the Number of Incremovable Subarrays I

#2970 Easy

Sum of Consecutive Subarrays

#3284 Medium

Maximum Number of Matching Indices After Right Shifts

#3400 Medium

Find the Lexicographically Largest String From the Box I

#3403 Medium

Find the Lexicographically Largest String From the Box II

#3406 Hard

Longest Common Prefix After at Most One Removal

#3460 Medium
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.