Skip to content

Latest commit

 

History

History
50 lines (42 loc) · 10.9 KB

two_pointers.md

File metadata and controls

50 lines (42 loc) · 10.9 KB

Two Pointers

Principe

Le principe des deux pointeurs est une technique couramment utilisée en programmation pour résoudre des problèmes qui impliquent de parcourir une liste ou un tableau. L'idée est d'utiliser deux indices (ou pointeurs) pour explorer le tableau. Ces pointeurs peuvent se déplacer dans la structure selon certaines conditions, ce qui permet de résoudre le problème de manière optimale, souvent avec une complexité temporelle linéaire.

Facile

Label Tags Date
26. Remove Duplicates from Sorted Array Array, Two Pointers 29-03-2024
27. Remove Element Array, Two Pointers 29-03-2024
28. Find the Index of the First Occurrence in a String Two Pointers, String, String Matching 17-05-2024
75. Sort Colors Array, Two Pointers, Sorting 12-06-2024
88. Merge Sorted Array Array, Two Pointers, Sorting 21-02-2024
141. Linked List Cycle Hash Table, Linked List, Two Pointers 06-03-2024
151. Reverse Words in a String String, Two Pointers 12-03-2024
160. Intersection of Two Linked Lists Hash Table, Linked List, Two Pointers 16-04-2024
202. Happy Number Hash Table, Math, Two Pointers 13-04-2024
234. Palindrome Linked List Linked List, Two Pointers, Stack, Recursion 22-03-2024
283. Move Zeroes Array, Two Pointers 12-03-2024
345. Reverse Vowels of a String String, Two Pointers 20-02-2024
349. Intersection of Two Arrays Array, Hash Table, Binary Search, Sorting 10-03-2024
392. Is Subsequence String, Two Pointers, Dynamic Programming 08-03-2024
876. Middle of the Linked List Linked List, Two Pointers 07-03-2024
977. Squares of a Sorted Array Array, Two Pointers, Sorting 02-03-2024
1768. Merge Strings Alternately String, Two Pointers 20-02-2024
2441. Largest Positive Integer That Exists With Its Negative Array, Hash Table, Two Pointers, Sorting 03-05-2024
2540. Minimum Common Value Array, Hash Table, Two Pointers, Binary Search 09-03-2024
2824. Count Pairs Whose Sum is Less than Target Array, Two Pointers, Binary Search, Sorting 30-06-2024

Moyen

Label Tags Date
11. Container With Most Water Array, Two Pointers, Greedy 18-04-2024
19. Remove Nth Node From End of List Linked List, Two Pointers 03-03-2024
80. Remove Duplicates from Sorted Array II Array, Two Pointers 29-03-2024
143. Reorder List Linked List, Two Pointers, Stack, Recursion 23-03-2024
443. String Compression String, Two Pointers 12-03-2024
948. Bag of Tokens Array, Greedy, Two Pointers, Sorting 04-03-2024
1679. Max Number of K-Sum Pairs Array, Two Pointers, Sorting, Hash Table 13-03-2024
1750. Minimum Length of String After Deleting Similar Ends String, Two Pointers 05-03-2024
2486. Append Characters to String to Make Subsequence Two Pointers, String, Greedy 03-06-2024

Difficile

Label Tags Date
42. Trapping Rain Water Array, Two Pointers, Dynamic Programming, Stack, Monotonic Stack 20-05-2024