beneyal / ztm-dsa-scala

Some solutions to the exercises from the "Master the Coding Interview: Data Structures + Algorithms" course from Zero to Mastery.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Master the Coding Interview: Data Structures + Algorithms - Scala Edition

Introduction

This repository is a collection of solutions to exercises from the course Master the Coding Interview: Data Structures + Algorithms.

Solutions are written in Scala 2.13.8.

As Scala is a hybrid object-oriented and functional programming language, I have implemented all solutions as functionally as possible. This means that (for the most part) there won't be in-place mutations, no nulls, and there will be lots of recursion.

If you see the @tailrec annotation above a function definition, this means it is recursive, but will essentially compile to an iterative loop (so no extra stack space is consumed).

Requirements

  • Java Development Kit version 8 or later
  • sbt

Playing Around

Clone the repository, cd into it, run sbt run and select the module to run.

Coding

If you want to change the code, I recommend either JetBrains IntelliJ IDEA with the Scala plugin, or Visual Studio Code with the Metals plugin.

Contributing

This repository is mostly a one-and-done, but if you want to improve or add solutions, feel free to open an issue or a pull request and I will review them when I can.

About

Some solutions to the exercises from the "Master the Coding Interview: Data Structures + Algorithms" course from Zero to Mastery.


Languages

Language:Scala 100.0%