This repository contains all of my Rust solutions to Leetcode problems.
- Write solutions in an idiomatic Rust way (e.g. implementing traits, using higher-order functions, etc)
- Avoid writing solutions that depend on external crates
- Fine for initial prototypes, but the final solution should be written idiomatically
- Don't needlessly optimize if the bruteforce solution is "Good Enough"
- 1. Two Sum
- 9. Palindrome Number
- 14. Longest Common Prefix
- 21. Merge Two Sorted Lists
- 26. Remove Duplicates from Sorted Array
- 94. Binary Tree Inorder Traversial
- 121. Best Time to Buy And Sell Stock
- 125. Valid Palindrome
- 226. Invert Binary Tree
- 242. Valid Anagram
- 704. Binary Search
- 733. Flood Fill
- 1207. Unique Number of Occurrances
- FB Mock Interview: Shuffle String
- FB Mock Interview: Minimum Time Visiting All Points
- 2. Add Two Numbers
- 5. Longest Palindromic Substring
- 6. Zig Zag Conversion
- 7. Reverse Integer
- 11. Container with Most Water
- 12. Integer to Roman
- 50. Pow(x, n)
- 4. Median of Two Sorted Arrays
- 15. 3Sum: brute-force solution only, need to optimize
- 17. Letter Combinations of a Phone Number
- 235. Lowest Common Ancestor of a Binary Search Tree
- 10. Regular Expression Matching