Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/scribu/train-tickets.rs

Rust programming exercise
https://github.com/scribu/train-tickets.rs

Last synced: about 6 hours ago
JSON representation

Rust programming exercise

Awesome Lists containing this project

README

        

# Train Tickets

Problem: Implement an algorithm for allocating seats for train passengers. Each coach has a number of compartments; each compartment has a fixed number of seats.

A person buying multiple seats (for their family, or for a group of friends etc.) should have them in the same compartment or in as few compartments as possible.

Developed using rustc 0.13.0-nightly (0a5e7f359 2014-11-03 23:16:55 +0000).

### Running interactively

```
cargo run
```

### Running tests

```
cargo test
```