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.
Instructions
Clone it and run
sbt test
You'll see most tests failing. Fill in the missing implementations and make them all pass.
Notes
The code is based on Phil's snippets with some minor and a few bigger changes. Some were necessary (e.g. because of a newer Scala version), some added clarity or conciseness.
Uses Scala 2.11, SBT, and ScalaTest.
Contributions
Contributions are welcome via GitHub issues or pull requests.
Solutions
You'll learn most if you find 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.
Problem Overview
- Working with lists (1-28)
- Arithmetic (31-41)
- Logic and Codes (46-50)
- Binary Trees (55-69)
- Multiway Trees (70-73)
- Graphs (80-89)
- Miscellaneous Problems: (90-99)
- Eight queens problem
- Knight's tour
- Von Koch's conjecture
- An Arithmetic puzzle
- Generate K-regular simple graphs with N nodes
- English number words
- Syntax checker
- Sudoku
- Nonograms
- Crossword puzzle