Friday, September 17, 2021

Two Pointers Problems in Leetcode

 1.Running from both ends of an array







 - 2 Sum problem

3Sum - LeetCode

 - Trapping Water 
Container With Most Water - LeetCode

Trapping Rain Water - LeetCode


 - Next Permutation

Next Permutation - LeetCode

Next Greater Element III - LeetCode

Minimum Adjacent Swaps to Reach the Kth Smallest Number - LeetCode


 - Reversing / Swapping

Valid Palindrome - LeetCode

Reverse String - LeetCode

Reverse Vowels of a String - LeetCode

Valid Palindrome II - LeetCode

Reverse Only Letters - LeetCode

Remove Element - LeetCode


 - Others

Bag of Tokens - LeetCode

DI String Match - LeetCode

Minimum Length of String After Deleting Similar Ends - LeetCode

Sentence Similarity III - LeetCode

Find K Closest Elements - LeetCode

Shortest Distance to a Character - LeetCode



2.Slow & Fast Pointers





 


 

 - Linked List Operations

Linked List Cycle - LeetCode

Linked List Cycle II - LeetCode

Remove Nth Node From End of List - LeetCode

Rotate List - LeetCode

Reorder List - LeetCode


 - Cyclic Detection

Find the Duplicate Number - LeetCode

Circular Array Loop - LeetCode


 - Sliding Window Like

Number of Subarrays with Bounded Maximum - LeetCode


 - String

String Compression - LeetCode


 - Remove Duplicate


 - Others

Statistics from a Large Sample - LeetCode

Partition Labels - LeetCode

Magical String - LeetCode

Friends Of Appropriate Ages - LeetCode

Longest Mountain in Array - LeetCode

Shortest Subarray to be Removed to Make Array Sorted - LeetCode


3.Running from beginning of 2 arrays / Merging 2 arrays









  - Sorted arrays

Merge Sorted Array - LeetCode


 - Intersection / LCA like

Intersection of Two Linked Lists - LeetCode 

Intersection of Two Arrays - LeetCode


 - Median Finder

 - Meet-in-the-middle / Binary Search


 - Others

Shortest Unsorted Continuous Subarray - LeetCode

Most Profit Assigning Work - LeetCode

Largest Merge Of Two Strings - LeetCode

Swap Adjacent in LR String - LeetCode


4.Split & Merge of an array / Divide & Conquer










 


 - Partition 

Partition List - LeetCode

 - Sorting

Sort List - LeetCode

No comments:

Post a Comment