bubble sort in rust as a cli
Find a file
2026-07-10 16:58:06 +02:00
src first commit 2026-07-10 16:58:06 +02:00
.gitignore first commit 2026-07-10 16:58:06 +02:00
Cargo.lock first commit 2026-07-10 16:58:06 +02:00
Cargo.toml first commit 2026-07-10 16:58:06 +02:00
README.md first commit 2026-07-10 16:58:06 +02:00

cargo run -- -h
Simple program to sort a list, self choosen or random generated

Usage: bubble-sort [OPTIONS]

Options:
  -n, --numbers <NUMBERS>      A list of numbers seperated by space or choosen [default: ""]
  -d, --delimiter <DELIMITER>  The demiter how the list is seperated, default is space [default: " "]
  -a, --amount <AMOUNT>        Amount of random Numbers to generate [default: 0]
      --max <MAX>              Max number to use for generating [default: 0]
      --min <MIN>              Min number to use for generating [default: 0]
  -h, --help                   Print help
  -V, --version                Print version

My try on a bubble sort program, either use numbers and delimiter to enter your own list and set the delitmier where to split the list.

Or simply use the amount and at least the max command to tell it how big the random number is allowed to be. Its using i32, so keep under 2147483647.