Dan Mailloux
Blog
Contact
Colored Functions Are Good, Actually
In defense of colored functions.
LeetCode 1805: Number Of Different Integers In A String
For this problem, we need to find the amount of unique integers in a string. The solution discussed in this article uses 2 pointers and iterates over the string only once.
LeetCode 1614: Maximum Nesting Depth Of The Parentheses
Sometimes a problem is easier than it looks. What initially looks like a stack problem turns out to be a simple matter of keeping track of a few numbers.
LeetCode 832: Flipping An Image
We use an easy problem to demonstrate starting simple and then iterating on a naive approach.
Binary Search
A very fast way to search for an item in a sorted array.