This repository contains LeetCode problem solutions implemented in Rust.
- 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
- 28. Implement strStr()
- 35. Search Insert Position
- 118. Pascal's Triangle
- 231. Power of Two
- 326. Power of Three
- 342. Power of Four
- 594. Longest Harmonious Subsequence
- 1290. Convert Binary Number in a Linked List to Integer
- 1394. Find Lucky Integer in an Array
- 1957. Delete Characters to Make Fancy String
- 2099. Find Subsequence of Length K With the Largest Sum
- 2210. Count Hills and Valleys in an Array
- 2264. Largest 3-Same-Digit Number in String
- 3136. Valid Word
- 3304. Find the K-th Character in String Game I
- 3330. Find the Original Typed String I
- 3477. Fruits Into Baskets II
- 3487. Maximum Unique Subarray Sum After Deletion
- 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
- 29. Divide Two Integers
- 31. Next Permutation
- 33. Search in Rotated Sorted Array
- 34. Find First and Last Position of Element in Sorted Array
- 869. Reordered Power of 2
- 898. Bitwise ORs of Subarrays
- 904. Fruit Into Baskets
- 912. Sort an Array
- 1233. Remove Sub-Folders from the Filesystem
- 1353. Maximum Number of Events That Can Be Attended
- 1498. Number of Subsequences That Satisfy the Given Sum Condition
- 1695. Maximum Erasure Value
- 1717. Maximum Score From Removing Substrings
- 1865. Finding Pairs With a Certain Sum
- 2044. Count Number of Maximum Bitwise OR Subsets
- 2419. Longest Subarray With Maximum Bitwise AND
- 2410. Maximum Matching of Players With Trainers
- 2438. Range Product Queries of Powers
- 2787. Ways to Express an Integer as Sum of Powers
- 3201. Find the Maximum Length of Valid Subsequence I
- 3202. Find the Maximum Length of Valid Subsequence II
- 3439. Reschedule Meetings for Maximum Free Time I
- 3440. Reschedule Meetings for Maximum Free Time II
- 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
- 1900. The Earliest and Latest Rounds Where Players Compete
- 2106. Maximum Fruits Harvested After at Most K Steps
- 2561. Rearranging Fruits
- 3307. Find the K-th Character in String Game II
- 3333. Find the Original Typed String II
# Run all tests
cargo test
# Run tests for a specific difficulty
cargo test easy
cargo test medium
cargo test hard
# Run a specific test
cargo test test_sort_array
tests/
├── easy/ # Easy difficulty problems
├── medium/ # Medium difficulty problems
├── hard/ # Hard difficulty problems
└── shared/ # Shared utilities
Each problem is implemented in its own file with comprehensive test cases to verify the solution correctness.