Skip to content

Commit

Permalink
Add Readme file for Rust implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
vikman90 committed Aug 6, 2022
1 parent d1c3ea3 commit 4779ffa
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions Rust/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# N-Queens problem using backtracking and CS

## Rust implementation

### Set up

```sh
yum install rustc cargo
cargo build --release
```

### Syntax

```
queens [-h] [-p] [SIZE]
```

<dl>
<dt>-h</dt>
<dd>Show help.</dd>
<dt>-p</dt>
<dd>Enable parallel mode.</dd>
<dt>SIZE</dt>
<dd>Length of the chess.</dd>
</dl>

### Example

```
# cargo run --release -- -p 4000
Queen 1: square 1252
Queen 2: square 2295
(...)
Queen 3999: square 3509
Queen 4000: square 1655
Trials: 58765
Discards: 182326630
Time: 4539 ms.
Performance: 0.013 steps/μs.
40.167 discards/μs.
```

0 comments on commit 4779ffa

Please sign in to comment.