A tutorial on how to use the Scala Algorithms website and how to get the most out of it

What is a Scala Algorithm Solution?

Programming interviews often rely on coding challenges, that will test both the language expertise as well as general algorithm knowledge. These algorithms may also be needed in day-to-day work.

A "Scala Algorithm Solution" helps you tackle these challenges, because it explores the chellenge in detail.

What are its components?

  1. Problem: the definition of the challenge, including references to coding platforms that may have a similar problem. We also provide a variety of examples and explanations of what the problem entails.
  2. Solution: the code solution, written in Scala 2.13. There are some solutions for which access is paid, in order to help sustain the publishing and maintenance of the highest possible quality of content. The solution is not written to any particular code challenge platform, but rather as a general solution. Every solution comes with unit test cases (see: Unit testing is simple ), so that you can verify that it really works, and if you are working on an algorithm, to know you are always in good shape with the solution.
    💡 A solution can be copied to the clipboard so you can test and experiment to the code. See below how to do it in your Browser with Scastie 👇!
  3. Explanation: the explanation of the algorithm, and the choices of Scala patterns to apply this algorithm. This is provided for all solutions, so that even if you do not purchase access to a paid solution, you can still figure it out.
    🔥 Many explanations contain mathematics where appropriate, to help you prove them, so you can deal with other similar problems in future! (rather than just knowing how to solve one problem, you can learn to solve many)

How to run a solution in Scastie?

Once you have copied the solution, open https://scastie.scala-lang.org/, and paste the code there. Then press the "Save" button and your solution will run.

The Save/Run button, example of test cases, and also example of custom code to check the solution.

How to get the most out of it

Use IntelliSense
Import the solution into an IDE like IntelliJ IDEA Community Edition, so you can explore what is available in Scala.
Run the Unit test cases, and try to break and fix the code
This helps you get a better understanding of Scala and the algorithm involved. You can even break up the code into smaller chunks, and test them individually as well. This will help you tackle problems much more efficiently as you learn how to break them down.
Join the Members' room
You can become a member of the community and ask questions by becoming registered, which you can by purchasing access to at least one Paid solution. This way, we will be able to support any questions and feedback you may have, to improve your learning.
Get an introduction to SBT
The Essential SBT tutorial will help you get started with the Scala Build Tool, to enable you to build production apps and also more easily run the algorithm solutions.
So that you can get further tips, hints and updates to the Scala Algorithms.