Skip to content

ellie-idb/leetcode-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetcode-rs

This repository contains all of my Rust solutions to Leetcode problems.

Goals

  • 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"

Problems Solved

Easy

  • 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

Medium

  • 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)

Hard

  • 4. Median of Two Sorted Arrays

Problems In-Progress

Easy

Medium

  • 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

Hard

  • 10. Regular Expression Matching

About

My Leetcode solutions - written in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages