A repository with my attempt to solve 99 Scala Problems.
1. 99 Scala Problems
2. Code Layout
3. Question Topics
4. Testing
5. License
The 99 Scala Problems are defined here but a copy has been made in this repository in 99-scala-problems.txt.
Example problem:
P01 (*) Find the last element of a list.
Example:
scala> last(List(1, 1, 2, 3, 5, 8))
res0: Int = 8
Each problem has its own object, e.g. P01
with a corresponding test class, e.g. P01Test
. The only dependency used is ScalaTest.
Topic | Questions |
---|---|
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 |
To run the tests, go to the root of the repository and run the following:
sbt
sbt:99-scala-problems> test
Copyright © 2020, tcooling
Released under the MIT license, see LICENSE for details.