Skip to content

ghimiresdp/rust-challenges

Repository files navigation

rust-challenges

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"

List of packages in this repository

  1. _lib (See contents) : Contains common methods used by all other packages

  2. basic Challenges : Contains Basic challenges

  3. mid-level Challenges : Contains Intermediate challenges

  4. pro Challenges : Contains Pro challenges

  5. design_patterns (See contents): Contains Design Pattern examples

    1. Singleton Pattern
    2. Factory Pattern
    3. Builder Pattern
    4. Decorator Pattern
    5. Observer Pattern
    6. Strategy Pattern
    7. Command Pattern
    8. Adapter Pattern
  6. Data Structure and Algorithms: Contains Data Structures and Algorithm examples

    1. Searching
      1. Linear Searching
      2. Binary Searching
    2. Sorting
      1. bubble sort
      2. selection sort
      3. insertion sort
      4. quick sort

Running binaries

To run any binary, you can run the command cargo run --bin <bin_name>

Example:

cargo run --bin practical_number

Testing

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

About

This is a repository for rust users, who want to solve difficult challenges in rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages