Repository navigation
Add approaches (Dig Deeper) for isogram - #1022
Merged
Merged
Conversation
Four approaches: filter with distinct, counting with groupMapReduce, tail recursion with a Set, and a bit field with bitCount. Closes #984 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Hello 👋 Thanks for your PR. This repo does not currently have dedicated maintainers. Our cross-track maintainers team will attempt to review and merge your PR, but it will likely take longer for your PR to be reviewed. If you enjoy contributing to Exercism and have a track-record of doing so successfully, you might like to become an Exercism maintainer for this track. Please feel free to ask any questions, or chat to us about anything to do with this PR or the reviewing process on the Exercism forum. (cc @exercism/cross-track-maintainers) |
rabestro
marked this pull request as draft
November 14, 2026 21:30
rabestro
marked this pull request as ready for review
November 22, 2026 16:17
IsaacG
approved these changes
Nov 22, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #984
isogram's "Dig Deeper" tab is empty on the Scala track. This adds an introduction and four approaches:
distinctletters.distinct.length == letters.length(the current example)countinggroupMapReduce(identity)(_ => 1)(_ + _).values.forall(_ == 1)recursion-setSet[Char]that stops at the first repeated letterbit-fieldfoldLeftthat sets a bit per letter, thenInteger.bitCount(seen) == letters.lengthThe issue asks to refresh the exercise first. That is already done on
main: the suite is generated and the example is Scala 3, so this PR only adds.approaches/.Two things differ from the issue:
bit-fieldhas no early exit, unlike the Python and JavaScript bit fields. It comparesbitCountwith the number of letters, so it does not repeatrecursion-setwith anIntin place of theSet.bit-fieldhas a caution block: it handles onlyatoz, so a word that repeats a letter such aséwould be taken for an isogram. The other three useisLetter.Checks
.scalafmt.conf.https://www.scala-lang.org/api/current/..., and every external link resolves.bin/configlet lintpasses.🤖 Generated with Claude Code