Think in Scala & master the highest paid programming language in the US
Scala is used at many places, such as AirBnB, Apple, Bank of America, BBC, Barclays, Capital One, Citibank, Coursera, eBay, JP Morgan, LinkedIn, Morgan Stanley, Netflix, Singapore Exchange, Twitter.
Study our 94 Scala Algorithms: 6 fully free, 54 published & 40 upcoming
Fully unittested, with explanations and relevant concepts; new algorithms published about once a week.
 Monitor success rate of a process that may fail
 Find combinations adding up to N (unique)
 Find k closest elements to a value in a sorted Array
 Quick Sort sorting algorithm in pure immutable Scala
 Find minimum missing positive number in a sequence
 Compute a Roman numeral for an Integer, and viceversa
 Matching parentheses algorithm with foldLeft and a state machine
 Traverse a tree BreadthFirst, immutably
 Read a matrix as a spiral
 Remove duplicates from a sorted list (state machine)
 Merge Sort: stacksafe, tailrecursive, in pure immutable Scala, Nway
 Longest increasing subsequence length
 Binary search a generic Array
 Merge Sort: in pure immutable Scala
 Is an Array a permutation?
 Count number of contiguous countries by colors
 Add numbers without using addition (plus sign)
 Tic Tac Toe MinMax solve
 Runlength encoding (RLE) Encoder
 Print Alphabet Diamond
 Balanced parentheses algorithm with tailcall recursion optimisation
 Reverse a String's words efficiently
 Count number of changes (manipulations) needed to make an anagram with foldLeft and a MultiSet
 Counting inversions of a sequence (array) using a Merge Sort
 Check if an array is a palindrome
 Compute nth row of Pascal's triangle
 Runlength encoding (RLE) Decoder
 Check if a number is a palindrome
 In a range of numbers, count the numbers divisible by a specific integer
 Find the index of a substring ('indexOf')
 Reshape a matrix
 Closest pair of coordinates in a 2D plane
 Find the contiguous slice with the minimum average
 Compute maximum sum of subarray (Kadane's algorithm)
 Binary search in a rotated sorted array
 Rotate Array right in purefunctional Scala  using an unusual immutable efficient approach
 Length of the longest common substring
 Tic Tac Toe board check
 Find an unpaired number in an array
 Check if a String is a palindrome
 Count binary gap size of a number using tail recursion
 Remove duplicates from a sorted list (Sliding)
 Find subarray with the maximum sum
 Find the minimum absolute difference of two partitions
 Find maximum potential profit from an array of stock price
 Fibonacci in purely functional immutable Scala
 Fizz Buzz in purely functional immutable Scala
 Find combinations adding up to N (nonunique)
 Count factors/divisors of an integer
 Compute singledigit sum of digits
 Traverse a tree DepthFirst
 Reverse bits of an integer
 QuickSelect Selection Algorithm (kth smallest item/order statistic)
 Rotate a matrix by 90 degrees clockwise
Explore the 21 most useful Scala concepts
To save you going through various tutorials, we cherrypicked the most useful Scala concepts in a consistent form.
 Class Inside Class
 Class Inside Def
 Collect
 Def Inside Def
 Drop, Take, dropRight, takeRight
 foldLeft and foldRight
 Forcomprehension
 Lazy List
 Option Type
 Ordering
 Partial Function
 Pattern Matching
 Range
 scanLeft and scanRight
 Sliding / Sliding Window
 Stack Safety
 State machine
 Tail Recursion
 Type Class
 View
 Zip
Register now (free)
How the algorithms look
 A description/goal of the algorithm.
 An explanation with both Scala and logical parts.
 A proof or a derivation, where appropriate.
 Links to Scala concepts used in this specific algorithm, also unittested.
 An implementation in purefunctional immutable Scala, with efficiency in mind (for most algorithms, this is for paid subscribers only).
 Unit tests, with a button to run them immediately in our inbrowser IDE.
What our users say

I was struggling with how best to take the algorithm and translate it into Scala code that represented the Scala idiom.

I didn't even know doing this [algos immutably] was possible.

This is awesome!