Convenient starting point for Phil Gold's S99: Ninety-Nine Scala Problems. Contains skeleton scala code (taken from the S99 snippets) and complete test coverage for all problems.
You need SBT installed. Clone the project and run
sbt test
You'll see most tests failing. Fill in the missing implementations using your favourite text editor or IDE, and make them pass.
My problem descriptions come in the form of a Gist (work in progress). They are tailored to the code and differ in some places from Phil's descriptions.
You'll learn most if you design and implement your own solutions. However, if you need inspiration or want to compare solutions, you're welcome to look at my attempts on the solutions
branch, or at Phil's solutions on his S99 website.
The code is based on Phil's snippets with some changes in order to be able to add tests, or because a newer Scala version required them.
Libraries used:
Library | Version |
---|---|
Scala | 2.12.2 |
ScalaTest | 3.0.1 |
Parser Combinators | 1.0.5 |
Parser Combinators come in handy in those tree or graph problems that task us to convert from String representations to objects.
Contributions are welcome via GitHub issues or pull requests.