This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
Atbash Cipher | |
The Atbash Cipher is simple: replace every letter with its “mirror” in the alphabet. | |
A is replaced by Z. B is replaced by Y. Etc. Write a function to calculate it. | |
Examples | |
(atbash "") ;=> "" | |
(atbash "hello") ;=> "svool" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import $scalac.`-Ypartial-unification` | |
import $dep.`org.typelevel::cats-core:2.3.0` | |
import scala.collection.immutable._ | |
import cats.Foldable | |
import cats.implicits._ | |
/** | |
* Balanced Paren Clusters |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Given two words, we can determine if they have the same vowels, | |
* ignoring order and repetition. | |
* | |
* For instance, “Hello” and “Vowel” both have \e and \o, so they have the same vowels. | |
* | |
* Write a function that groups words into “families” that all have the same vowels. | |
* “Tree” and “tent” also belong to the same family because we ignore the repetition of \e. | |
* | |
* Examples |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version = "3.5.3" | |
maxColumn = 100 | |
runner.dialect = scala3 | |
style = defaultWithAlign | |
align.openParenCallSite = false | |
align.openParenDefnSite = false | |
continuationIndent.callSite = 2 | |
continuationIndent.defnSite = 2 | |
spaces.inImportCurlyBraces = false | |
project.excludeFilters = [".*\\.sbt"] |
OlderNewer