Skip to content

RogerChou12/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Practice

Two Pointers

Medium 5. Longest Palindromic Substring [C]
Medium 11. Container With Most Water[C]
Medium 15. 3Sum [Python] [C]
Medium 16. 3Sum Closest [C]
Medium 26. Remove Duplicates from Sorted Array [C]
Easy 27. Remove Element [C]
Medium 31. Next Permutation [C]
Medium 75. Sort Colors [C]
Medium 80. Remove Duplicates from Sorted Array II [C]
Medium 82. Remove Duplicates from Sorted List II [C]
Easy 88. Merge Sorted Array [C]
Easy 125. Valid Palindrome [C]
Medium 142. Linked List Cycle II [C]
Medium 148. Sort List [C]
Medium 151. Reverse Words in a String [C]
Easy 160. Intersection of Two Linked Lists [C]
Medium 167. Two Sum II - Input Array Is Sorted [C]
Medium 189. Rotate Array [C]
Easy 202. Happy Number [C]
Easy 234. Palindrome Linked List [C]
Easy 283. Move Zeroes [C]
Easy 392. Is Subsequence [C]
Medium 443. String Compression [C]
Easy 455. Assign Cookies [C]
Easy 557. Reverse Words in a String III [C]
Medium 611. Valid Triangle Number [C]
Medium 647. Palindromic Substrings [C]
Medium 763. Partition Labels [C]
Easy 832. Flipping an Image [C]
Easy 876. Middle of the Linked List [C]
Medium 969. Pancake Sorting [C]
Easy 977. Squares of a Sorted Array [C]
Medium 1679. Max Number of K-Sum Pairs [C]
Medium 1721. Swapping Nodes in a Linked List [C]
Medium 1768. Merge Strings Alternately [C]
Medium 1877. Minimize Maximum Pair Sum in Array [C]
Easy 2000. Reverse Prefix of Word [C]
Medium 2095. Delete the Middle Node of a Linked List [C]
Medium 2130. Maximum Twin Sum of a Linked List [C]
Medium 2149. Rearrange Array Elements by Sign [C]
Medium 2161. Partition Array According to Given Pivot [C]
Medium 2300. Successful Pairs of Spells and Potions [C]
Easy 2824. Count Pairs Whose Sum is Less than Target [C]
Medium 3132. Find the Integer Added to Array II [C]
Medium 3239. Minimum Number of Flips to Make Binary Grid Palindromic I [C]
Medium 3240. Minimum Number of Flips to Make Binary Grid Palindromic II [C]
Medium 3403. Find the Lexicographically Largest String From the Box I [C]

Bit Manipulation

Medium 29. Divide Two Integers [C]
Medium 78. Subsets [C]
Medium 89. Gray Code [C]
Easy 136. Single Number [C]
Medium 137. Single Number II [C]
Easy 190. Reverse Bits [C]
Easy 191. Number of 1 Bits [C]
Medium 287. Find the Duplicate Number [C]
Easy 338. Counting Bits [C]
Easy 342. Power of Four [C]
Medium 371. Sum of Two Integers [C]
Easy 461. Hamming Distance [C]
Medium 779. K-th Symbol in Grammar [C]
Medium 784. Letter Case Permutation [C]
Medium 861. Score After Flipping Matrix [C]
Medium 898. Bitwise ORs of Subarrays [C++]
Medium 1239. Maximum Length of a Concatenated String with Unique Characters [C]
Medium 1318. Minimum Flips to Make a OR b Equal to c [C]
Medium 1442. Count Triplets That Can Form Two Arrays of Equal XOR [C]
Medium 1457. Pseudo-Palindromic Paths in a Binary Tree [C]
Medium 1461. Check If a String Contains All Binary Codes of Size K [C]
Easy 1720. Decode XORed Array [C]
Medium 1829. Maximum XOR for Each Query [C]
Medium 2044. Count Number of Maximum Bitwise-OR Subsets [C]
Medium 2275. Largest Combination With Bitwise AND Greater Than Zero [C]
Medium 2305. Fair Distribution of Cookies [C]
Medium 2317. Maximum XOR After Operations [C]
Medium 2411. Smallest Subarrays With Maximum Bitwise OR [C]
Medium 2419. Longest Subarray With Maximum Bitwise AND [C]
Medium 2425. Bitwise XOR of All Pairings [C]
Medium 2429. Minimize XOR [C]
Medium 2433. Find The Original Array of Prefix Xor [C]
Medium 2657. Find the Prefix Common Array of Two Arrays [C]
Medium 2683. Neighboring Bitwise XOR [C]
Medium 2997. Minimum Number of Operations to Make Array XOR Equal to K [C]
Medium 3097. Shortest Subarray With OR at Least K II [C]
Medium 3133. Minimum Array End [C]
Easy 3304. Find the K-th Character in String Game I [C]
Easy 3370. Smallest Number With All Set Bits [C]

Linked List

Medium 19. Remove Nth Node From End of List [C]
Easy 21. Merge Two Sorted Lists [C]
Hard 23. Merge k Sorted Lists [C]
Medium 61. Rotate List [C]
Easy 83. Remove Duplicates from Sorted List [C]
Medium 86. Partition List [C]
Medium 92. Reverse Linked List II [C]
Medium 114. Flatten Binary Tree to Linked List [C]
Medium 116. Populating Next Right Pointers in Each Node [C]
Easy 141. Linked List Cycle [C]
Medium 143. Reorder List [C]
Easy 206. Reverse Linked List [C]
Medium 237. Delete Node in a Linked List [C]
Medium 328. Odd Even Linked List [C]
Easy 1290. Convert Binary Number in a Linked List to Integer [C]

String

Medium 1143. Longest Common Subsequence [C]
Easy 1957. Delete Characters to Make Fancy String [C]
Easy 2264. Largest 3-Same-Digit Number in String [C]
Easy 3136. Valid Word [C]

Array

Easy 118. Pascal's Triangle [C]
Medium 128. Longest Consecutive Sequence [Python]
Easy 1. Two Sum [C]
Medium 48. Rotate Image [C]
Medium 53. Maximum Subarray [C]
Medium 54. Spiral Matrix [C]
Medium 435. Non-overlapping Intervals [C]
Medium 56. Merge Intervals [C]
Medium 57. Insert Interval [C]
Medium 238. Product of Array Except Self [C]
Medium 498. Diagonal Traverse [C]
Medium 2438. Range Product Queries of Powers [C]
Easy 3000. Maximum Area of Longest Diagonal Rectangle [C]
Medium 3025. Find the Number of Ways to Place People I [C]
Medium 3027. Find the Number of Ways to Place People II [C]
Medium 3446. Sort Matrix by Diagonals [C]
Easy 3477. Fruits Into Baskets II [C]
Medium 3479. Fruits Into Baskets III [C]

Sliding Window

Medium 3. Longest Substring Without Repeating Characters [C]
Medium 904. Fruit Into Baskets [C]
Medium 1695. Maximum Erasure Value [C]

Breadth-First Search

Medium 133. Clone Graph [Python]
Medium 102. Binary Tree Level Order Traversal [C]

Depth-First Search

Medium 417. Pacific Atlantic Water Flow [C]
Easy 572. Subtree of Another Tree [C] [Python]
Medium 200. Number of Islands [C]
Medium 79. Word Search [C]

Dynamic Programming

Medium 139. Word Break [C]
Medium 152. Maximum Product Subarray [C]
Medium 300. Longest Increasing Subsequence [C]
Medium 322. Coin Change [C]
Medium 70. Climbing Stairs [C]
Medium 198. House Robber [C]
Medium 213. House Robber II [C]
Medium 91. Decode Ways [C]
Easy 121. Best Time to Buy and Sell Stock [C]
Medium 1277. Count Square Submatrices with All Ones [C]
Medium 1504. Count Submatrices With All Ones [C]
Medium 2787. Ways to Express an Integer as Sum of Powers [C]
Hard 3459. Length of Longest V-Shaped Diagonal Segment [C]

Greedy

Medium 55. Jump Game [C]
Medium 1792. Maximum Average Pass Ratio [C++]

Math

Medium 62. Unique Paths [C]
Easy 268. Missing Number [C]
Easy 326. Power of Three [C]
Medium 808. Soup Servings [C]
Medium 2348. Number of Zero-Filled Subarrays [C]
Medium 3021. Alice and Bob Playing Flower Game [C]
Easy 3516. Find Closest Person [C]

Stack

Easy 20. Valid Parentheses [C]
Medium 1717. Maximum Score From Removing Substrings [C]

Binary Search

Medium 153. Find Minimum in Rotated Sorted Array [C]
Medium 33. Search in Rotated Sorted Array [C]
Medium 235. Lowest Common Ancestor of a Binary Search Tree [C]

Backtracking

Medium 39. Combination Sum [C]
Hard 679. 24 Game [C]

Hash Table

Medium 49. Group Anagrams [C] [Python]
Medium 73. Set Matrix Zeroes [C]
Easy 217. Contains Duplicate [C]
Medium 347. Top K Frequent Elements [C]
Easy 242. Valid Anagram [C]

Tree

Medium 98. Validate Binary Search Tree [C]
Easy 226. Invert Binary Tree [C]
Easy 100. Same Tree [C]
Medium 230. Kth Smallest Element in a BST [C]
Easy 104. Maximum Depth of Binary Tree [C]
Medium 105. Construct Binary Tree from Preorder and Inorder Traversal [C]

Trie

Medium 208. Implement Trie (Prefix Tree) [Python]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published