Welcome to Scala Algorithms!

Available Scala algorithm solutions

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

    Free

  2. Count divisors algorithm in immutable/pure functional Scala

    Free

  3. Find an unpaired number in an array

    Free

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

    Free

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

    Free

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

    Free

  7. Fizz Buzz in purely functional immutable Scala

    Free

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

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

  10. Find sub-array with the maximum sum

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

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

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

  14. Check if a String is a palindrome in immutable 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