刷题不要停下来啊!!Don't stop writing!!
运行cargo test p[xxx]_
调用test。
Call test by running cargo test p[xxx]_
.
- 1. Two Sum
- 9. Palindrome Number
- 13. Roman to Integer
- 14. Longest Common Prefix
- 20. Valid Parentheses
- 21. Merge Two Sorted Lists
- 26. Remove Duplicates from Sorted Array
- 27. Remove Element
- 35. Search Insert Position
- 53. Maximum Subarray
- 58. Length of Last Word
- 66. Plus One
- 67. Add Binary
- 69. Sqrt(x)
- 70. Climbing Stairs
- 83. Remove Duplicates from Sorted List
- 88. Merge Sorted Array
- 94. Binary Tree Inorder Traversal
- 100. Same Tree
- 144. Binary Tree Preorder Traversal
- 145. Binary Tree Postorder Traversal
- 169. Majority Element
- 190. Reverse Bits
- 191. Number of 1 Bits
- 225. Implement Stack using Queues
- 232. Implement Queue using Stacks
- 263. Ugly Number
- 283. Move Zeroes
- 292. Nim Game
- 303. Range Sum Query - Immutable
- 383. Ransom Note
- 463. Island Perimeter
- 496. Next Greater Element I
- 509. Fibonacci Number
- 705. Design HashSet
- 706. Design HashMap
- 746. Min Cost Climbing Stairs
- 896. Monotonic Array
- 938. Range Sum of BST
- 993. Cousins in Binary Tree
- 1047. Remove All Adjacent Duplicates In String
- 1137. N-th Tribonacci Number
- 1154. Day of the Year
- 1184. Distance Between Bus Stops
- 1185. Day of the Week
- 1260. Shift 2D Grid
- 1331. Rank Transform of an Array
- 1374. Generate a String With Characters That Have Odd Counts
- 1450. Number of Students Doing Homework at a Given Time
- 2042. Check if Numbers Are Ascending in a Sentence
- 2085. Count Common Words With One Occurrence
- 2129. Capitalize the Title
- 2293. Min Max Game
- 2299. Strong Password Checker II
- 2325. Decode the Message
- 2331. Evaluate Boolean Binary Tree
- 2335. Minimum Amount of Time to Fill Cups
- 2341. Maximum Number of Pairs in Array
- 2347. Best Poker Hand
- 2357. Make Array Zero by Subtracting Equal Amounts
- 2363. Merge Similar Items
- 2367. Number of Arithmetic Triplets
- 2373. Largest Local Values in a Matrix
- 2379. Minimum Recolors to Get K Consecutive Black Blocks
- 2383. Minimum Hours of Training to Win a Competition
- 2389. Longest Subsequence With Limited Sum
- 2395. Find Subarrays With Equal Sum
- 2399. Check Distances Between Same Letters
- 2404. Most Frequent Even Element
- 2409. Count Days Spent Together
- 2413. Smallest Even Multiple
- 2418. Sort the People
- 2427. Number of Common Factors
- 2432. The Employee That Worked on the Longest Task
- 2437. Number of Valid Clock Times
- 2441. Largest Positive Integer That Exists With Its Negative
- 2446. Determine if Two Events Have Conflict
- 2460. Apply Operations to an Array
- 2469. Convert the Temperature
- 2660. Determine the Winner of a Bowling Game
- 2670. Find the Distinct Difference Array
- 2696. Minimum String Length After Removing Substrings
- 2706. Buy Two Chocolates
- 2744. Find Maximum Number of String Pairs
- 2765. Longest Alternating Subarray
- 2788. Split Strings by Separator
- 2810. Faulty Keyboard
- 2859. Sum of Values at Indices With K Set Bits
- 2864. Maximum Odd Binary Number
- 2917. Find the K-or of an Array
- 3162. Find the Number of Good Pairs I
- 2. Add Two Numbers
- 3. Longest Substring Without Repeating Characters
- 5. Longest Palindromic Substring
- 6. Zigzag Conversion
- 7. Reverse Integer
- 8. String to Integer (atoi)
- 11. Container With Most Water
- 12. Integer to Roman
- 15. 3Sum
- 16. 3Sum Closest
- 17. Letter Combinations of a Phone Number
- 18. 4Sum
- 19. Remove Nth Node From End of List
- 22. Generate Parentheses
- 24. Swap Nodes in Pairs
- 28. Find the Index of the First Occurrence in a String
- 29. Divide Two Integers
- 31. Next Permutation
- 33. Search in Rotated Sorted Array
- 34. Find First and Last Position of Element in Sorted Array
- 36. Valid Sudoku
- 38. Count and Say
- 39. Combination Sum
- 40. Combination Sum II
- 43. Multiply Strings
- 45. Jump Game II
- 46. Permutations
- 47. Permutations II
- 48. Rotate Image
- 49. Group Anagrams
- 50. Pow(x, n)
- 54. Spiral Matrix
- 55. Jump Game
- 56. Merge Intervals
- 57. Insert Interval
- 59. Spiral Matrix II
- 61. Rotate List
- 62. Unique Paths
- 63. Unique Paths II
- 64. Minimum Path Sum
- 71. Simplify Path
- 73. Set Matrix Zeroes
- 74. Search a 2D Matrix
- 75. Sort Colors
- 77. Combinations
- 78. Subsets
- 79. Word Search
- 80. Remove Duplicates from Sorted Array II
- 81. Search in Rotated Sorted Array II
- 82. Remove Duplicates from Sorted List II
- 86. Partition List
- 89. Gray Code
- 90. Subsets II
- 91. Decode Ways
- 92. Reverse Linked List II
- 93. Restore IP Addresses
- 95. Unique Binary Search Trees II
- 96. Unique Binary Search Trees
- 97. Interleaving String
- 98. Validate Binary Search Tree
- 99. Recover Binary Search Tree
- 102. Binary Tree Level Order Traversal
- 103. Binary Tree Zigzag Level Order Traversal
- 105. Construct Binary Tree from Preorder and Inorder Traversal
- 106. Construct Binary Tree from Inorder and Postorder Traversal
- 107. Binary Tree Level Order Traversal II
- 128. Longest Consecutive Sequence
- 131. Palindrome Partitioning
- 134. Gas Station
- 139. Word Break
- 150. Evaluate Reverse Polish Notation
- 165. Compare Version Numbers
- 173. Binary Search Tree Iterator
- 189. Rotate Array
- 221. Maximal Square
- 227. Basic Calculator II
- 235. Lowest Common Ancestor of a Binary Search Tree
- 236. Lowest Common Ancestor of a Binary Tree
- 238. Product of Array Except Self
- 264. Ugly Number II
- 299. Bulls and Cows
- 300. Longest Increasing Subsequence
- 310. Minimum Height Trees
- 331. Verify Preorder Serialization of a Binary Tree
- 338. Counting Bits
- 365. Water and Jug Problem
- 438. Find All Anagrams in a String
- 447. Number of Boomerangs
- 456. 132 Pattern
- 478. Generate Random Point in a Circle
- 503. Next Greater Element II
- 516. Longest Palindromic Subsequence
- 556. Next Greater Element III
- 560. Subarray Sum Equals K
- 670. Maximum Swap
- 673. Number of Longest Increasing Subsequence
- 712. Minimum ASCII Delete Sum for Two Strings
- 740. Delete and Earn
- 814. Binary Tree Pruning
- 831. Masking Personal Information
- 877. Stone Game
- 889. Construct Binary Tree from Preorder and Postorder Traversal
- 894. All Possible Full Binary Trees
- 931. Minimum Falling Path Sum
- 970. Powerful Integers
- 983. Minimum Cost For Tickets
- 1006. Clumsy Factorial
- 1003. Check If Word Is Valid After Substitutions
- 1010. Pairs of Songs With Total Durations Divisible by 60
- 1017. Convert to Base -2
- 1019. Next Greater Node In Linked List
- 1023. Camelcase Matching
- 1024. Video Stitching
- 1026. Maximum Difference Between Node and Ancestor
- 1031. Maximum Sum of Two Non-Overlapping Subarrays
- 1039. Minimum Score Triangulation of Polygon
- 1040. Moving Stones Until Consecutive II
- 1041. Robot Bounded In Circle
- 1042. Flower Planting With No Adjacent
- 1053. Previous Permutation With One Swap
- 1124. Longest Well-Performing Interval
- 1125. Smallest Sufficient Team
- 1129. Shortest Path with Alternating Colors
- 1138. Alphabet Board Path
- 1139. Largest 1-Bordered Square
- 1140. Stone Game II
- 1144. Decrease Elements To Make Array Zigzag
- 1145. Binary Tree Coloring Game
- 1161. Maximum Level Sum of a Binary Tree
- 1227. Airplane Seat Assignment Probability
- 1233. Remove Sub-Folders from the Filesystem
- 1234. Replace the Substring for Balanced String
- 1237. Find Positive Integer Solution for a Given Equation
- 1238. Circular Permutation in Binary Representation
- 1247. Minimum Swaps to Make Strings Equal
- 1261. Find Elements in a Contaminated Binary Tree
- 1276. Number of Burgers with No Waste of Ingredients
- 1318. Minimum Flips to Make a OR b Equal to c
- 1376. Time Needed to Inform All Employees
- 1419. Minimum Number of Frogs Croaking
- 1487. Making File Names Unique
- 1574. Shortest Subarray to be Removed to Make Array Sorted
- 1590. Make Sum Divisible by P
- 1599. Maximum Profit of Operating a Centennial Wheel
- 1604. Alert Using Same Key-Card Three or More Times in a One Hour Period
- 1605. Find Valid Matrix Given Row and Column Sums
- 1615. Maximal Network Rank
- 1616. Split Two Strings to Make Palindrome
- 1625. Lexicographically Smallest String After Applying Operations
- 1626. Best Team With No Conflicts
- 1630. Arithmetic Subarrays
- 1637. Widest Vertical Area Between Two Points Containing No Points
- 1638. Count Substrings That Differ by One Character
- 1641. Count Sorted Vowel Strings
- 1653. Minimum Deletions to Make String Balanced
- 1686. Stone Game VI
- 1690. Stone Game VII
- 1696. Jump Game VI
- 1702. Maximum Binary String After Change
- 1792. Maximum Average Pass Ratio
- 1797. Design Authentication Manager
- 1798. Maximum Number of Consecutive Values You Can Make
- 1807. Evaluate the Bracket Pairs of a String
- 1813. Sentence Similarity III
- 1814. Count Nice Pairs in an Array
- 1817. Finding the Users Active Minutes
- 1828. Queries on Number of Points Inside a Circle
- 1870. Minimum Speed to Arrive on Time
- 1954. Minimum Garden Perimeter to Collect Enough Apples
- 1962. Remove Stones to Minimize the Total
- 1969. Minimum Non-Zero Product of the Array Elements
- 1976. Number of Ways to Arrive at Destination
- 2171. Removing Minimum Number of Magic Beans
- 2182. Construct String With Repeat Limit
- 2187. Minimum Time to Complete Trips
- 2192. All Ancestors of a Node in a Directed Acyclic Graph
- 2368. Reachable Nodes With Restrictions
- 2369. Check if There is a Valid Partition For The Array
- 2380. Time Needed to Rearrange a Binary String
- 2397. Maximum Rows Covered by Columns
- 2428. Maximum Sum of an Hourglass
- 2476. Closest Nodes Queries in a Binary Search Tree
- 2487. Remove Nodes From Linked List
- 2575. Find the Divisibility Array of a String
- 2583. Kth Largest Sum in a Binary Tree
- 2641. Cousins in Binary Tree II
- 2645. Minimum Additions to Make Valid String
- 2671. Frequency Tracker
- 2673. Make Costs of Paths Equal in a Binary Tree
- 2684. Maximum Number of Moves in a Grid
- 2707. Extra Characters in a String
- 2735. Collecting Chocolates
- 2789. Largest Element in an Array after Merge Operations
- 2807. Insert Greatest Common Divisors in Linked List
- 2808. Minimum Seconds to Equalize a Circular Array
- 2834. Find the Minimum Possible Sum of a Beautiful Array
- 2861. Maximum Number of Alloys
- 2865. Beautiful Towers I
- 4. Median of Two Sorted Arrays
- 10. Regular Expression Matching
- 23. Merge k Sorted Lists
- 25. Reverse Nodes in k-Group
- 30. Substring with Concatenation of All Words
- 32. Longest Valid Parentheses
- 37. Sudoku Solver
- 41. First Missing Positive
- 42. Trapping Rain Water
- 44. Wildcard Matching
- 51. N-Queens
- 52. N-Queens II
- 60. Permutation Sequence
- 65. Valid Number
- 68. Text Justification
- 72. Edit Distance
- 76. Minimum Window Substring
- 84. Largest Rectangle in Histogram
- 85. Maximal Rectangle
- 87. Scramble String
- 115. Distinct Subsequences
- 132. Palindrome Partitioning II
- 224. Basic Calculator
- 233. Number of Digit One
- 239. Sliding Window Maximum
- 354. Russian Doll Envelopes
- 410. Split Array Largest Sum
- 420. Strong Password Checker
- 466. Count The Repetitions
- 514. Freedom Trail
- 600. Non-negative Integers without Consecutive Ones
- 871. Minimum Number of Refueling Stops
- 902. Numbers At Most N Given Digit Set
- 982. Triples with Bitwise AND Equal To Zero
- 987. Vertical Order Traversal of a Binary Tree
- 1000. Minimum Cost to Merge Stones
- 1012. Numbers With Repeated Digits
- 1032. Stream of Characters
- 1092. Shortest Common Supersequence
- 1096. Brace Expansion II
- 1147. Longest Chunked Palindrome Decomposition
- 1210. Minimum Moves to Reach Target with Rotations
- 1223. Dice Roll Simulation
- 1250. Check If It Is a Good Array
- 1255. Maximum Score Words Formed by Letters
- 1326. Minimum Number of Taps to Open to Water a Garden
- 1349. Maximum Students Taking Exam
- 1397. Find All Good Strings
- 1483. Kth Ancestor of a Tree Node
- 1617. Count Subtrees With Max Distance Between Cities
- 1632. Rank Transform of a Matrix
- 1793. Maximum Score of a Good Subarray
- 1819. Number of Different Subsequences GCDs
- 1825. Finding MK Average
- 1928. Minimum Cost to Reach Destination in Time
- 1944. Number of Visible People in a Queue
- 2312. Selling Pieces of Wood
- 2376. Count Special Integers
- 2386. Find the K-Sum of an Array
- 2488. Count Subarrays With Median K
- 2581. Count Number of Possible Root Nodes
- 2719. Count of Integers
- 2809. Minimum Time to Make Array Sum At Most x
- 2846. Minimum Edge Weight Equilibrium Queries in a Tree
- 2867. Count Valid Paths in a Tree