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.hs

Haskell programming exercise
https://github.com/scribu/train-tickets.hs

Last synced: about 6 hours ago
JSON representation

Haskell 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.

### Installing

```
cabal install
```

### Running interactively

```
runhaskell Console.hs
```

### Running tests

```
runhaskell test/Spec.hs
```