This is a repository for Rust learners as well as coding challenge seekers.
The repository contains 4 different packages with multiple binaries inside them.
The binaries are specified in the respective cargo.toml
file.
[dependencies]
[[bin]]
name = "minimize_sum"
path = "src/minimize_sum.rs"
[[bin]]
name = "practical_number"
path = "src/practical_number.rs"
-
_lib
(See contents) : Contains common methods used by all other packages -
basic
Challenges : Contains Basic challenges -
mid
-level Challenges : Contains Intermediate challenges -
pro
Challenges : Contains Pro challenges -
design_patterns
(See contents): Contains Design Pattern examples -
Data Structure and Algorithms: Contains Data Structures and Algorithm examples
- Searching
- Sorting
To run any binary, you can run the command cargo run --bin <bin_name>
Example:
cargo run --bin practical_number
I have added test cases for each functions/challenges which will be beneficial for you to learn testing as well as test programs for errors.
To test programs, you can run cargo test
command.
Example:
cargo test
# alternatively, to test individual binary, you can run
cargo test --bin your_program_name