Algorithm of the Day Series' Articles

Back to Alisa Bajramovic's Series
The Happy Number Problem

The Happy Number Problem

Kadane's Algorithm & The Maximum Subarray Problem

Kadane's Algorithm & The Maximum Subarray Problem

Finding the Only Single Number in an Array

Finding the Only Single Number in an Array

Finding the Middle of a Linked List

Finding the Middle of a Linked List

Backspace String Comparisons: Two Ways To Approach a Common Algorithm

Backspace String Comparisons: Two Ways To Approach a Common Algorithm

The Stock Span Problem: Using Stacks To Keep Track Of What's Been Seen

The Stock Span Problem: Using Stacks To Keep Track Of What's Been Seen

Finding the Kth Smallest Element: Walking Through How To Use Depth First Search on a Binary Search Tree

Finding the Kth Smallest Element: Walking Through How To Use Depth First Search on a Binary Search Tree

The Boyer-Moore Majority Vote Algorithm: Finding the Majority Element in an Array

The Boyer-Moore Majority Vote Algorithm: Finding the Majority Element in an Array

Sorting Characters in a String By Their Frequency

Sorting Characters in a String By Their Frequency

Finding the Intersection of Two Arrays

Finding the Intersection of Two Arrays

Finding the Minimum Path Sum in a Grid with Dynamic Programming

Finding the Minimum Path Sum in a Grid with Dynamic Programming

Floyd's Tortoise and Hare Algorithm: Finding a Cycle in a Linked List

Floyd's Tortoise and Hare Algorithm: Finding a Cycle in a Linked List

The Sieve of Eratosthenes: Counting the Number of Primes

The Sieve of Eratosthenes: Counting the Number of Primes

The Longest Substring With No Repeating Characters

The Longest Substring With No Repeating Characters

Merging Sorted Lists, Two Ways

Merging Sorted Lists, Two Ways

Finding the Longest Common Prefix

Finding the Longest Common Prefix

Reversing a String in Place

Reversing a String in Place

The ZigZag Conversion Problem

The ZigZag Conversion Problem

The Longest Palindromic Substring: Solving the Problem Using Constant Space

The Longest Palindromic Substring: Solving the Problem Using Constant Space

Removing an Element in an Array In-Place

Removing an Element in an Array In-Place

Solving the Best Time to Buy and Sell Stocks Problem in One Pass

Solving the Best Time to Buy and Sell Stocks Problem in One Pass

Don't Underestimate the Two Pointers: Removing the N-th Node from the End of a Linked List

Don't Underestimate the Two Pointers: Removing the N-th Node from the End of a Linked List

Not an "Easy" Algorithm: Rotating an Array, Three Ways

Not an "Easy" Algorithm: Rotating an Array, Three Ways

Sudoku Part I: Is the Board Valid?

Sudoku Part I: Is the Board Valid?

Searching an Array, Two Ways

Searching an Array, Two Ways

The Climbing Staircase Problem: How to Solve It, and Why the Fibonacci Numbers are Relevant

The Climbing Staircase Problem: How to Solve It, and Why the Fibonacci Numbers are Relevant

Transposing and Reversing: How to Rotate a 2D Matrix 90 Degrees

Transposing and Reversing: How to Rotate a 2D Matrix 90 Degrees

Turning 38 into 2: How to Solve the Add Digits Problem

Turning 38 into 2: How to Solve the Add Digits Problem

The Gauss Sum, and Solving for the Missing Number

The Gauss Sum, and Solving for the Missing Number

Is this Number the Sum of Two Square Integers? Solving The Sum of Squares Algorithm Two Ways

Is this Number the Sum of Two Square Integers? Solving The Sum of Squares Algorithm Two Ways

The Word Pattern Algorithm: How to Test if a String Follows a Pattern

The Word Pattern Algorithm: How to Test if a String Follows a Pattern

Finding the Intersection of Two Arrays

Finding the Intersection of Two Arrays

Top Interview Question: Finding the First Unique Character in a String using Linear Time

Top Interview Question: Finding the First Unique Character in a String using Linear Time

Solving Pascal's Triangle in JavaScript

Solving Pascal's Triangle in JavaScript

The Maximum Number of Events Problem

The Maximum Number of Events Problem

Solving Binary Tree Algorithms Using Recursion and Queues

Solving Binary Tree Algorithms Using Recursion and Queues

From "hello world" to "world hello": Reversing the Words in a String

From "hello world" to "world hello": Reversing the Words in a String

Finding the Most Frequent Elements in an Array