Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/scribu/train-tickets.hs
- Owner: scribu
- Created: 2014-04-30T22:32:12.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-08T15:51:10.000Z (over 10 years ago)
- Last Synced: 2024-10-18T15:53:08.041Z (21 days ago)
- Language: Haskell
- Size: 172 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```