DEV Community

Algorithm of the Day Series' Articles

Back to ab's Series
The Happy Number Problem

The Happy Number Problem

82
Comments 9
4 min read
Kadane's Algorithm & The Maximum Subarray Problem
Cover image for Kadane's Algorithm & The Maximum Subarray Problem

Kadane's Algorithm & The Maximum Subarray Problem

56
Comments 3
5 min read
Finding the Only Single Number in an Array

Finding the Only Single Number in an Array

20
Comments 4
3 min read
Finding the Middle of a Linked List
Cover image for Finding the Middle of a Linked List

Finding the Middle of a Linked List

35
Comments 2
3 min read
Backspace String Comparisons: Two Ways To Approach a Common Algorithm
Cover image for Backspace String Comparisons: Two Ways To Approach a Common Algorithm

Backspace String Comparisons: Two Ways To Approach a Common Algorithm

12
Comments 6
7 min read
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

10
Comments 1
5 min read
Finding the Kth Smallest Element: Walking Through How To Use Depth First Search on a Binary Search Tree
Cover image for 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

11
Comments
6 min read
The Boyer-Moore Majority Vote Algorithm: Finding the Majority Element in an Array
Cover image for 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

22
Comments 2
5 min read
Sorting Characters in a String By Their Frequency

Sorting Characters in a String By Their Frequency

14
Comments 2
3 min read
Finding the Intersection of Two Arrays

Finding the Intersection of Two Arrays

8
Comments 1
3 min read
Finding the Minimum Path Sum in a Grid with Dynamic Programming
Cover image for Finding the Minimum Path Sum in a Grid with Dynamic Programming

Finding the Minimum Path Sum in a Grid with Dynamic Programming

9
Comments 1
7 min read
Floyd's Tortoise and Hare Algorithm: Finding a Cycle in a Linked List
Cover image for 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

126
Comments 8
4 min read
The Sieve of Eratosthenes: Counting the Number of Primes

The Sieve of Eratosthenes: Counting the Number of Primes

14
Comments
3 min read
Add Two Numbers Problems: How to Sum Two Linked Lists
Cover image for Add Two Numbers Problems: How to Sum Two Linked Lists

Add Two Numbers Problems: How to Sum Two Linked Lists

26
Comments 3
6 min read
The Longest Substring With No Repeating Characters
Cover image for The Longest Substring With No Repeating Characters

The Longest Substring With No Repeating Characters

11
Comments 1
6 min read
Merging Sorted Lists, Two Ways

Merging Sorted Lists, Two Ways

12
Comments
9 min read
Finding the Longest Common Prefix
Cover image for Finding the Longest Common Prefix

Finding the Longest Common Prefix

12
Comments 2
5 min read
Reversing a String in Place
Cover image for Reversing a String in Place

Reversing a String in Place

15
Comments 2
4 min read
The ZigZag Conversion Problem

The ZigZag Conversion Problem

31
Comments 1
7 min read
The Longest Palindromic Substring: Solving the Problem Using Constant Space
Cover image for The Longest Palindromic Substring: Solving the Problem Using Constant Space

The Longest Palindromic Substring: Solving the Problem Using Constant Space

67
Comments 5
14 min read
Removing an Element in an Array In-Place
Cover image for Removing an Element in an Array In-Place

Removing an Element in an Array In-Place

28
Comments 3
5 min read
Solving the Best Time to Buy and Sell Stocks Problem in One Pass
Cover image for 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

28
Comments 2
7 min read
Don't Underestimate the Two Pointers: Removing the N-th Node from the End of a Linked List
Cover image for 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

11
Comments
5 min read
Not an "Easy" Algorithm: Rotating an Array, Three Ways
Cover image for Not an "Easy" Algorithm: Rotating an Array, Three Ways

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

89
Comments 19
11 min read
Sudoku Part I: Is the Board Valid?
Cover image for Sudoku Part I: Is the Board Valid?

Sudoku Part I: Is the Board Valid?

10
Comments
9 min read
Searching an Array, Two Ways
Cover image for Searching an Array, Two Ways

Searching an Array, Two Ways

9
Comments 3
6 min read
The Climbing Staircase Problem: How to Solve It, and Why the Fibonacci Numbers are Relevant
Cover image for 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

68
Comments 10
5 min read
Transposing and Reversing: How to Rotate a 2D Matrix 90 Degrees

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

21
Comments 2
6 min read
Turning 38 into 2: How to Solve the Add Digits Problem

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

11
Comments 7
5 min read
The Gauss Sum, and Solving for the Missing Number
Cover image for The Gauss Sum, and Solving for the Missing Number

The Gauss Sum, and Solving for the Missing Number

14
Comments 2
3 min read