Awesome
P-99: Ninety-Nine Prolog Problems (Mort's Solutions)
Summary
This is the working repository of my (Mort Yao's) solutions to the Ninety-Nine Prolog Problems by Werner Hett.
Some adaptations existed for a variety of programming languages (Prolog, Lisp, Haskell, Scala, OCaml and Python). They are quite worth reading if you are interested in solutions written in one specific language of these. (See References)
This repo is where I put my own solutions and is intended to be multilingual. So far I'm only working on solutions in Ruby; implementations in more languages will be added in the future.
Feedback is very appreciated (especially if you find a solution is incorrect). You may report issues here on GitHub.
Overview
- Lists (Problems 01 ~ 28)
- Arithmetic (Problems 31 ~ 41)
- Logic and codes (Problems 46 ~ 50)
- Binary trees (Problems 54A ~ 69)
- Multiway trees (Problems 70B ~ 73)
- Graphs (Problems 80 ~ 89)
- Miscellaneous problems (Problems 90 ~ 99)
(NOTE: Though the problems number from 1 to 99, there are some gaps and some additions marked with letters. There are actually only 88 problems.)
Getting Started
To view and run these solutions, no extra dependencies are needed. (inevitably you'll need a "standard" programming environment for that language)
- Ruby: ruby 1.9
To generate viewable HTML documents of all problems and solutions (in all available programming languages), these dependencies in relatively recent versions are required:
- Ruby and Gems: rake, liquid, rdiscount
- pygments
- bash (in Windows
rake
must run in a MSYS shell)
References
- P-99: Ninety-Nine Prolog Problems
- L-99: Ninety-Nine Lisp Problems
- H-99: Ninety-Nine Haskell Problems
- S-99: Ninety-Nine Scala Problems
- 99 Problems in OCaml
- 99 Problems in Python
Licensing
The source code here is in the Public Domain.