DEV Community

Algorithm of the Day Series' Articles

Back to Alisa Bajramovic's Series
The Happy Number Problem

The Happy Number Problem

Reactions 53 Comments 8
4 min read
Kadane's Algorithm & The Maximum Subarray Problem

Kadane's Algorithm & The Maximum Subarray Problem

Reactions 28 Comments 2
5 min read
Finding the Only Single Number in an Array

Finding the Only Single Number in an Array

Reactions 18 Comments 2
3 min read
Finding the Middle of a Linked List

Finding the Middle of a Linked List

Reactions 18 Comments 2
3 min read
Backspace String Comparisons: Two Ways To Approach a Common Algorithm

Backspace String Comparisons: Two Ways To Approach a Common Algorithm

Reactions 6 Comments 4
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

Reactions 9 Comments
5 min read
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

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

Reactions 12 Comments 1
5 min read
Sorting Characters in a String By Their Frequency

Sorting Characters in a String By Their Frequency

Reactions 10 Comments 1
3 min read
Finding the Intersection of Two Arrays

Finding the Intersection of Two Arrays

Reactions 6 Comments
3 min read
Finding the Minimum Path Sum in a Grid with Dynamic Programming

Finding the Minimum Path Sum in a Grid with Dynamic Programming

Reactions 10 Comments 1
7 min read
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

Reactions 35 Comments 2
4 min read
The Sieve of Eratosthenes: Counting the Number of Primes

The Sieve of Eratosthenes: Counting the Number of Primes

Reactions 9 Comments
3 min read
Add Two Numbers Problems: How to Sum Two Linked Lists

Add Two Numbers Problems: How to Sum Two Linked Lists

Reactions 13 Comments 3
6 min read
The Longest Substring With No Repeating Characters

The Longest Substring With No Repeating Characters

Reactions 9 Comments
6 min read
Merging Sorted Lists, Two Ways

Merging Sorted Lists, Two Ways

Reactions 9 Comments
9 min read
Finding the Longest Common Prefix

Finding the Longest Common Prefix

Reactions 10 Comments 2
5 min read
Reversing a String in Place

Reversing a String in Place

Reactions 8 Comments
4 min read
The ZigZag Conversion Problem

The ZigZag Conversion Problem

Reactions 14 Comments
7 min read
The Longest Palindromic Substring: Solving the Problem Using Constant Space

The Longest Palindromic Substring: Solving the Problem Using Constant Space

Reactions 51 Comments 4
14 min read
Removing an Element in an Array In-Place

Removing an Element in an Array In-Place

Reactions 10 Comments 2
5 min read
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

Reactions 8 Comments
7 min read
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

Reactions 9 Comments
5 min read
Not an "Easy" Algorithm: Rotating an Array, Three Ways

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

Reactions 81 Comments 18
11 min read
Sudoku Part I: Is the Board Valid?

Sudoku Part I: Is the Board Valid?

Reactions 7 Comments
9 min read
Searching an Array, Two Ways

Searching an Array, Two Ways

Reactions 8 Comments 3
6 min read
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

Reactions 86 Comments 7
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

Reactions 8 Comments
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

Reactions 10 Comments 7
5 min read
The Gauss Sum, and Solving for the Missing Number

The Gauss Sum, and Solving for the Missing Number

Reactions 8 Comments 1
3 min read
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

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

Reactions 11 Comments 1
5 min read
Finding the Intersection of Two Arrays

Finding the Intersection of Two Arrays

Reactions 10 Comments 1
3 min read
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

Reactions 9 Comments 2
4 min read
Solving Pascal's Triangle in JavaScript

Solving Pascal's Triangle in JavaScript

Reactions 13 Comments 2
4 min read
The Maximum Number of Events Problem

The Maximum Number of Events Problem

Reactions 10 Comments
5 min read
Solving Binary Tree Algorithms Using Recursion and Queues

Solving Binary Tree Algorithms Using Recursion and Queues

Reactions 10 Comments
5 min read
From "hello world" to "world hello": Reversing the Words in a String

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

Reactions 7 Comments 2
4 min read
Finding the Most Frequent Elements in an Array

Finding the Most Frequent Elements in an Array

Reactions 9 Comments
4 min read
Finding the Angle Between the Hands of a Clock

Finding the Angle Between the Hands of a Clock

Reactions 9 Comments 1
5 min read
The Container with the Most Water: Solving an Algorithm about Areas

The Container with the Most Water: Solving an Algorithm about Areas

Reactions 4 Comments
5 min read