/a-hundred-and-one-days-of-rust-leetcoding

A hundred days of Rust Leetcoding

Primary LanguageRustMIT LicenseMIT

A Hundred and One Days of Rust Leetcoding

This project contains solutions to Leetcode problems implemented in Rust. Each day, a new problem is solved and added to the corresponding module.

Unit test Coverage Status

Running the Project

Before running the project, you need to have Rust installed. You can install Rust by following the instructions here. Once Rust is installed, you can run the project by executing the following command to run all problems:

cargo test

If you want to run specific problems, you can execute the following command : cargo test day_XXX. Change XXX with the day number you want to run. For example, if you want to run the day zero, you can execute the following command:

cargo test day_000

Modules

  • day_000_palindrome_number: Solution for the Palindrome Number problem.
  • day_001_power_of_three: Solution for the Power of Three problem.
  • day_002_distribute_candies: Solution for the Distribute Candies problem.
  • day_003_gray_code: Solution for the Gray Code problem.
  • day_004_valid_parentheses: Solution for the Valid Parentheses problem.
  • day_005_combination_sum: Solution for the Combination Sum problem.

Coverage

Currently the coverage test is not included in Github Actions. It run locally by executing the following command:

export $(cat .env | xargs) && cargo tarpaulin --engine llvm --follow-exec --post-test-delay 10 --coveralls $COVERALLS_TOKEN

See the .env`` sample in env.sample`