Welcome to Scala Algorithms!

Get unlimited solutions!

  • Unlimited access to all paid solutions
  • Access to a private members' forum

Available Scala algorithm solutions

  1. Count binary gap size of a number in immutable/pure functional Scala using tail recursion

    Free

  2. Check if an array is a palindrome in pure immutable Scala

    Free

  3. Find an unpaired number in an array

    Free

  4. Count divisors algorithm in immutable/pure functional Scala

    Free

  5. Fizz Buzz in purely functional immutable Scala

    Free

  6. Find maximum potential profit from an array of stock prices - pure-functional immutable Scala solution

    Free

  7. Balanced parentheses algorithm in immutable/pure functional Scala with tail-call recursion optimisation

    Free

  8. Count number of changes (manipulations) needed to make an anagram in immutable/pure functional Scala with foldLeft and a MultiSet

  9. Check if a number is a palindrome in pure immutable Scala

  10. Check if a String is a palindrome in immutable Scala

  11. Compute maximum sum of subarray (Kadane's algorithm) in purely functional immutable Scala

  12. Matching parentheses algorithm in immutable/pure functional Scala with foldLeft and a state machine

  13. Find sub-array with the maximum sum

  14. Traverse a tree Breadth-First, immutably, and purely in Scala

  15. Traverse a tree Depth-First with purely-functional immutable Scala

  16. Count Factors of an integer in pure-functional immutable Scala

    Coming soon

  17. Longest Increasing sub-sequence

    Coming soon

  18. Rotate Array right in pure-functional Scala - using an unusual immutable efficient approach

    Coming soon