A curated collection of LeetCode solutions implemented in Rust.
Problems are organized by difficulty and each module exposes a Solution
type with multiple algorithmic approaches and tests.
src/ # Problem implementations grouped by difficulty
├── easy/
├── medium/
└── hard/
src/utils/ # Shared data structures and helpers
examples/ # Small executable usage examples
tests/ # Integration and property tests
benches/ # Criterion benchmarks
See PROJECT_STATUS.md for progress and README_BENCHMARKS.md for benchmarking notes.
Add the crate to your project and call solution methods:
use rust_leetcode::easy::two_sum::Solution;
fn main() {
let solution = Solution::new();
let result = solution.two_sum(vec![2, 7, 11, 15], 9);
assert_eq!(result, vec![0, 1]);
}
Run tests with:
cargo test
Run benchmarks (see README_BENCHMARKS.md):
cargo bench
Contributions are welcome! See CONTRIBUTING.md for guidelines.
MIT
Marvin Tutt, Caia Tech