<![CDATA[Scala Algorithms]]>
2022-01-27
https://www.scala-algorithms.com
Compute missing ranges
2022-01-27
# Compute missing ranges

Visit the Algorithm page

Find kth largest element in a List
2022-01-20
# Find kth largest element in a List

Visit the Algorithm page

Find the minimum item in a rotated sorted array
2022-01-13
# Find the minimum item in a rotated sorted array

Visit the Algorithm page

Compute the steps to transform an anagram only using swaps
2021-12-30
# Compute the steps to transform an anagram only using swaps

Visit the Algorithm page

Compute minimum number of Fibonacci numbers to reach sum
2021-12-23
# Compute minimum number of Fibonacci numbers to reach sum

Visit the Algorithm page

Fixed Window Rate Limiter
2021-12-16
# Fixed Window Rate Limiter

Visit the Algorithm page

Token Bucket Rate Limiter
2021-12-09
# Token Bucket Rate Limiter

Visit the Algorithm page

Leaky Bucket Rate Limiter
2021-12-02
# Leaky Bucket Rate Limiter

Visit the Algorithm page

Least-recently used cache (MRU)
2021-11-25
# Least-recently used cache (MRU)

Visit the Algorithm page

Game of Life
2021-11-18
# Game of Life

Visit the Algorithm page

Find triplets that sum to a target ('3Sum')
2021-11-04
# Find triplets that sum to a target ('3Sum')

Visit the Algorithm page

Reverse Polish Notation calculator
2021-10-28
# Reverse Polish Notation calculator

Visit the Algorithm page

Mars Rover
2021-10-21
# Mars Rover

Visit the Algorithm page

Find indices of tuples that sum to a target (Two Sum)
2021-10-14
# Find indices of tuples that sum to a target (Two Sum)

Visit the Algorithm page

Sliding Window Rate Limiter
2021-10-07
# Sliding Window Rate Limiter

Visit the Algorithm page

Compute modulo of an exponent without exponentiation
2021-09-23
# Compute modulo of an exponent without exponentiation

Visit the Algorithm page

Count pairs of a given expected sum
2021-09-16
# Count pairs of a given expected sum

Visit the Algorithm page

Establish execution order from dependencies
2021-09-09
# Establish execution order from dependencies

Visit the Algorithm page

Check a binary tree is balanced
2021-09-02
# Check a binary tree is balanced

Visit the Algorithm page

Compute keypad possibilities
2021-08-26
# Compute keypad possibilities

Visit the Algorithm page

Reverse first n elements of a queue
2021-08-19
# Reverse first n elements of a queue

Visit the Algorithm page

Least-recently used cache (LRU)
2021-08-12
# Least-recently used cache (LRU)

Visit the Algorithm page

Find height of binary tree
2021-08-05
# Find height of binary tree

Visit the Algorithm page

Check a binary tree is a search tree
2021-07-29
# Check a binary tree is a search tree

Visit the Algorithm page

Make a binary search tree (Red-Black tree)
2021-07-22
# Make a binary search tree (Red-Black tree)

Visit the Algorithm page

Check a directed graph has a routing between two nodes (depth-first search)
2021-07-15
# Check a directed graph has a routing between two nodes (depth-first search)

Visit the Algorithm page

Longest common prefix of strings
2021-07-08
# Longest common prefix of strings

Visit the Algorithm page

Check if a directed graph has cycles
2021-07-01
# Check if a directed graph has cycles

Visit the Algorithm page

Pure-functional double linked list
2021-06-24
# Pure-functional double linked list

Visit the Algorithm page

Count passing cars
2021-06-17
# Count passing cars

Visit the Algorithm page

Remove duplicates from an unsorted List
2021-06-10
# Remove duplicates from an unsorted List

Visit the Algorithm page

Make a queue using Maps
2021-06-03
# Make a queue using Maps

Visit the Algorithm page

Make a queue using stacks (Lists in Scala)
2021-05-28
# Make a queue using stacks (Lists in Scala)

Visit the Algorithm page

Single-elimination tournament tree
2021-05-20
# Single-elimination tournament tree

Visit the Algorithm page

Compute the length of longest valid parentheses
2021-05-13
# Compute the length of longest valid parentheses

Visit the Algorithm page

Binary search in a rotated sorted array
2021-05-06
# Binary search in a rotated sorted array

Visit the Algorithm page

Find combinations adding up to N (unique)
2021-04-29
# Find combinations adding up to N (unique)

Visit the Algorithm page

Find the index of a substring ('indexOf')
2021-04-24
# Find the index of a substring ('indexOf')

Visit the Algorithm page

Reverse bits of an integer
2021-04-17
# Reverse bits of an integer

Visit the Algorithm page

Find k closest elements to a value in a sorted Array
2021-04-10
# Find k closest elements to a value in a sorted Array

Visit the Algorithm page

Reshape a matrix
2021-04-03
# Reshape a matrix

Visit the Algorithm page

Remove duplicates from a sorted list (Sliding)
2021-03-27
# Remove duplicates from a sorted list (Sliding)

Visit the Algorithm page

Remove duplicates from a sorted list (state machine)
2021-03-20
# Remove duplicates from a sorted list (state machine)

Visit the Algorithm page

Find combinations adding up to N (non-unique)
2021-03-13
# Find combinations adding up to N (non-unique)

Visit the Algorithm page

Compute single-digit sum of digits
2021-03-06
# Compute single-digit sum of digits

Visit the Algorithm page

Add numbers without using addition (plus sign)
2021-02-27
# Add numbers without using addition (plus sign)

Visit the Algorithm page

Tic Tac Toe MinMax solve
2021-02-20
# Tic Tac Toe MinMax solve

Visit the Algorithm page

Compute nth row of Pascal's triangle
2021-02-14
# Compute nth row of Pascal's triangle

Visit the Algorithm page

Print Alphabet Diamond
2021-02-11
# Print Alphabet Diamond

Visit the Algorithm page

Reverse a String's words efficiently
2021-02-04
# Reverse a String's words efficiently

Visit the Algorithm page

Monitor success rate of a process that may fail
2021-01-28
# Monitor success rate of a process that may fail

Visit the Algorithm page

QuickSelect Selection Algorithm (kth smallest item/order statistic)
2021-01-21
# QuickSelect Selection Algorithm (kth smallest item/order statistic)

Visit the Algorithm page

Rotate a matrix by 90 degrees clockwise
2021-01-14
# Rotate a matrix by 90 degrees clockwise

Visit the Algorithm page

Read a matrix as a spiral
2021-01-07
# Read a matrix as a spiral

Visit the Algorithm page

Count number of contiguous countries by colors
2021-01-01
# Count number of contiguous countries by colors

Visit the Algorithm page

Length of the longest common substring
2020-12-24
# Length of the longest common substring

Visit the Algorithm page

Find minimum missing positive number in a sequence
2020-12-20
# Find minimum missing positive number in a sequence

Visit the Algorithm page

Binary search a generic Array
2020-12-17
# Binary search a generic Array

Visit the Algorithm page

Run-length encoding (RLE) Decoder
2020-12-15
# Run-length encoding (RLE) Decoder

Visit the Algorithm page

Run-length encoding (RLE) Encoder
2020-12-13
# Run-length encoding (RLE) Encoder

Visit the Algorithm page

Find the contiguous slice with the minimum average
2020-12-10
# Find the contiguous slice with the minimum average

Visit the Algorithm page

Tic Tac Toe board check
2020-12-06
# Tic Tac Toe board check

Visit the Algorithm page

Find the minimum absolute difference of two partitions
2020-12-03
# Find the minimum absolute difference of two partitions

Visit the Algorithm page

Compute a Roman numeral for an Integer, and vice-versa
2020-11-29
# Compute a Roman numeral for an Integer, and vice-versa

Visit the Algorithm page

Quick Sort sorting algorithm in pure immutable Scala
2020-11-26
# Quick Sort sorting algorithm in pure immutable Scala

Visit the Algorithm page

Fibonacci in purely functional immutable Scala
2020-11-22
# Fibonacci in purely functional immutable Scala

Visit the Algorithm page

In a range of numbers, count the numbers divisible by a specific integer
2020-11-19
# In a range of numbers, count the numbers divisible by a specific integer

Visit the Algorithm page

Is an Array a permutation?
2020-11-15
# Is an Array a permutation?

Visit the Algorithm page

Merge Sort: stack-safe, tail-recursive, in pure immutable Scala, N-way
2020-11-12
# Merge Sort: stack-safe, tail-recursive, in pure immutable Scala, N-way

Visit the Algorithm page

Closest pair of coordinates in a 2D plane
2020-11-05
# Closest pair of coordinates in a 2D plane

Visit the Algorithm page

Counting inversions of a sequence (array) using a Merge Sort
2020-10-30
# Counting inversions of a sequence (array) using a Merge Sort

Visit the Algorithm page

Rotate Array right in pure-functional Scala - using an unusual immutable efficient approach
2020-10-26
# Rotate Array right in pure-functional Scala - using an unusual immutable efficient approach

Visit the Algorithm page

Count factors/divisors of an integer
2020-10-22
# Count factors/divisors of an integer

Visit the Algorithm page

Merge Sort: in pure immutable Scala
2020-10-15
# Merge Sort: in pure immutable Scala

Visit the Algorithm page

Longest increasing sub-sequence length
2020-10-01
# Longest increasing sub-sequence length

Visit the Algorithm page