DEV Community

Leetcode Solutions Series' Articles

Back to seanpgallivan's Series
Solution: Next Permutation
Cover image for Solution: Next Permutation

Solution: Next Permutation

102
Comments
3 min read
Solution: Trim a Binary Search Tree
Cover image for Solution: Trim a Binary Search Tree

Solution: Trim a Binary Search Tree

23
Comments
3 min read
Leetcode Solutions Index
Cover image for Leetcode Solutions Index

Leetcode Solutions Index

60
Comments 2
11 min read
Solution: Minimize Deviation in Array
Cover image for Solution: Minimize Deviation in Array

Solution: Minimize Deviation in Array

6
Comments 2
4 min read
Solution: Vertical Order Traversal of a Binary Tree
Cover image for Solution: Vertical Order Traversal of a Binary Tree

Solution: Vertical Order Traversal of a Binary Tree

5
Comments
4 min read
Solution: Count Ways to Make Array With Product
Cover image for Solution: Count Ways to Make Array With Product

Solution: Count Ways to Make Array With Product

3
Comments
5 min read
Solution: Smallest String With A Given Numeric Value
Cover image for Solution: Smallest String With A Given Numeric Value

Solution: Smallest String With A Given Numeric Value

5
Comments 2
3 min read
Solution: Linked List Cycle
Cover image for Solution: Linked List Cycle

Solution: Linked List Cycle

6
Comments
3 min read
Solution: Path With Minimum Effort
Cover image for Solution: Path With Minimum Effort

Solution: Path With Minimum Effort

5
Comments
4 min read
Solution: Concatenation of Consecutive Binary Numbers
Cover image for Solution: Concatenation of Consecutive Binary Numbers

Solution: Concatenation of Consecutive Binary Numbers

5
Comments
2 min read
Solution: Minimum Operations to Make a Subsequence
Cover image for Solution: Minimum Operations to Make a Subsequence

Solution: Minimum Operations to Make a Subsequence

6
Comments
3 min read
Solution: Longest Harmonious Subsequence
Cover image for Solution: Longest Harmonious Subsequence

Solution: Longest Harmonious Subsequence

4
Comments
2 min read
Solution: Simplify Path
Cover image for Solution: Simplify Path

Solution: Simplify Path

5
Comments
3 min read
Solution: Building Boxes
Cover image for Solution: Building Boxes

Solution: Building Boxes

4
Comments
3 min read
Solution: Decode XORed Permutation
Cover image for Solution: Decode XORed Permutation

Solution: Decode XORed Permutation

5
Comments
3 min read
Solution: Binary Tree Right Side View
Cover image for Solution: Binary Tree Right Side View

Solution: Binary Tree Right Side View

6
Comments
2 min read
Solution: Find Kth Largest XOR Coordinate Value
Cover image for Solution: Find Kth Largest XOR Coordinate Value

Solution: Find Kth Largest XOR Coordinate Value

6
Comments
5 min read
Solution: Change Minimum Characters to Satisfy One of Three Conditions
Cover image for Solution: Change Minimum Characters to Satisfy One of Three Conditions

Solution: Change Minimum Characters to Satisfy One of Three Conditions

8
Comments
5 min read
Solution: Shortest Distance to a Character
Cover image for Solution: Shortest Distance to a Character

Solution: Shortest Distance to a Character

7
Comments
3 min read
Solution: Peeking Iterator
Cover image for Solution: Peeking Iterator

Solution: Peeking Iterator

5
Comments
3 min read
Solution: Convert BST to Greater Tree
Cover image for Solution: Convert BST to Greater Tree

Solution: Convert BST to Greater Tree

4
Comments
2 min read
Solution: Copy List with Random Pointer
Cover image for Solution: Copy List with Random Pointer

Solution: Copy List with Random Pointer

8
Comments 1
3 min read
Solution: Valid Anagram
Cover image for Solution: Valid Anagram

Solution: Valid Anagram

10
Comments 1
2 min read
Solution: Number of Steps to Reduce a Number to Zero
Cover image for Solution: Number of Steps to Reduce a Number to Zero

Solution: Number of Steps to Reduce a Number to Zero

12
Comments 3
2 min read
Solution: Shortest Path in Binary Matrix
Cover image for Solution: Shortest Path in Binary Matrix

Solution: Shortest Path in Binary Matrix

12
Comments
5 min read
Solution: Is Graph Bipartite?
Cover image for Solution: Is Graph Bipartite?

Solution: Is Graph Bipartite?

6
Comments 1
4 min read
Solution: Maximum Score From Removing Substrings (ver. 1)
Cover image for Solution: Maximum Score From Removing Substrings (ver. 1)

Solution: Maximum Score From Removing Substrings (ver. 1)

7
Comments
4 min read
Solution: Maximum Score From Removing Substrings (ver. 2)
Cover image for Solution: Maximum Score From Removing Substrings (ver. 2)

Solution: Maximum Score From Removing Substrings (ver. 2)

11
Comments
4 min read
Solution: Sort the Matrix Diagonally
Cover image for Solution: Sort the Matrix Diagonally

Solution: Sort the Matrix Diagonally

11
Comments
4 min read
Solution: The K Weakest Rows in a Matrix (ver. 1)
Cover image for Solution: The K Weakest Rows in a Matrix (ver. 1)

Solution: The K Weakest Rows in a Matrix (ver. 1)

6
Comments
4 min read