| # | Title | Category | Description | Solution | Added |
|---|---|---|---|---|---|
| 1 | Two Sum | algorithm | Given an array of integers and a target find two numbers that add up to the target | solution | 2026-04-14 |
| 2 | Best Time to Buy and Sell Stock | algorithm | Given daily stock prices find the maximum profit from one buy and one sell | solution | 2026-04-16 |
| 3 | Binary Search | algorithm | Given a sorted array and a target find the target index or return -1 | solution | 2026-04-17 |
| 4 | Valid Anagram | algorithm | Given two strings determine whether they contain the same characters with the same counts | solution | 2026-04-20 |
| 5 | Valid Parentheses | algorithm | Given a string of brackets determine whether every bracket is closed in the correct order | solution | 2026-04-21 |
| 6 | Merge Two Sorted Lists | algorithm | Given two sorted linked lists merge them into one sorted linked list | solution | 2026-04-22 |
| 7 | Contains Duplicate | algorithm | Given an array of integers determine whether any value appears at least twice | solution | 2026-04-23 |
| 8 | Valid Palindrome | algorithm | Given a string determine whether it reads the same forward and backward after removing non-alphanumeric characters and ignoring case | solution | 2026-04-24 |
| 9 | Maximum Subarray | algorithm | Given an integer array find the contiguous subarray with the largest sum and return that sum | solution | 2026-04-27 |
| 10 | Move Zeroes | algorithm | Given an integer array move all zeroes to the end while keeping the relative order of non-zero elements | solution | 2026-04-28 |
| 11 | Climbing Stairs | algorithm | Given a staircase with n steps count how many distinct ways you can climb it when each move is 1 or 2 steps | solution | 2026-04-29 |
| 12 | First Bad Version | algorithm | Given n product versions and an API that identifies bad versions find the first bad version | solution | 2026-05-05 |
| 13 | Roman to Integer | algorithm | Given a roman numeral convert it to an integer | solution | 2026-05-06 |
| 14 | Reverse Linked List | algorithm | Given the head of a singly linked list reverse the list and return the new head | solution | 2026-05-07 |
| 15 | Linked List Cycle | algorithm | Given the head of a linked list determine whether the list contains a cycle | solution | 2026-05-08 |
| 16 | Middle of the Linked List | algorithm | Given the head of a singly linked list return the middle node | solution | 2026-05-11 |
| 17 | Plus One | algorithm | Given a non-empty array of digits representing a non-negative integer add one to the integer | solution | 2026-05-12 |
| 18 | Invert Binary Tree | algorithm | Given the root of a binary tree invert the tree and return its root | solution | 2026-05-20 |
| 19 | Maximum Depth of Binary Tree | algorithm | Given the root of a binary tree return its maximum depth | solution | 2026-05-21 |
| 20 | Same Tree | algorithm | Given the roots of two binary trees determine whether they are structurally identical and have the same node values | solution | 2026-05-22 |
| 21 | Symmetric Tree | algorithm | Given the root of a binary tree determine whether it is a mirror of itself | solution | 2026-05-26 |
| 22 | Subtree of Another Tree | algorithm | Given the roots of two binary trees determine whether one tree contains the other as a subtree | solution | 2026-05-26 |
| 23 | Balanced Binary Tree | algorithm | Given the root of a binary tree determine whether it is height-balanced | solution | 2026-05-27 |
| 24 | Diameter of Binary Tree | algorithm | Given the root of a binary tree return the length of the longest path between any two nodes | solution | 2026-05-28 |
| 25 | Minimum Depth of Binary Tree | algorithm | Given the root of a binary tree return its minimum depth | solution | 2026-05-29 |
| 26 | Path Sum | algorithm | Given the root of a binary tree and a target sum determine whether any root-to-leaf path sums to the target | solution | 2026-06-01 |
| 27 | Binary Tree Paths | algorithm | Given the root of a binary tree return all root-to-leaf paths as strings | solution | 2026-06-02 |
| 28 | Sum of Left Leaves | algorithm | Given the root of a binary tree return the sum of all left leaf values | solution | 2026-06-03 |
| 29 | Average of Levels in Binary Tree | algorithm | Given the root of a binary tree return the average value of the nodes on each level | solution | 2026-06-05 |
| 30 | Fizz Buzz | algorithm | Given an integer n return the Fizz Buzz representation for numbers from 1 to n | solution | 2026-06-05 |
| 31 | Cousins in Binary Tree | algorithm | Given the root of a binary tree and two node values determine whether the two nodes are cousins | solution | 2026-06-08 |
| 32 | Jewels and Stones | algorithm | Given strings jewels and stones count how many stones are jewels | solution | 2026-06-08 |
| 33 | Ransom Note | algorithm | Given strings ransomNote and magazine determine whether ransomNote can be constructed from the letters in magazine | solution | 2026-06-09 |
| 34 | First Unique Character in a String | algorithm | Given a string return the index of the first non-repeating character or -1 if none exists | solution | 2026-06-10 |
| 35 | Find the Difference | algorithm | Given two strings where one is a shuffled version of the other with one extra character return the extra character | solution | 2026-06-11 |
| 36 | Longest Palindrome | algorithm | Given a string return the length of the longest palindrome that can be built with its letters | solution | 2026-06-12 |
| 37 | Isomorphic Strings | algorithm | Given two strings determine whether each character in one string can map consistently and uniquely to the other | solution | 2026-06-15 |
| 38 | Word Pattern | algorithm | Given a pattern and a string of words determine whether the words follow the same one-to-one pattern | solution | 2026-06-17 |
| 39 | Intersection of Two Arrays | algorithm | Given two integer arrays return an array of their unique intersection | solution | 2026-06-18 |
| 40 | Nim Game | algorithm | Given n stones determine whether the first player can win when each turn removes one to three stones | solution | 2026-06-18 |
| 41 | Happy Number | algorithm | Given an integer determine whether repeatedly replacing it with the sum of squares of its digits eventually reaches 1 | solution | 2026-06-22 |
| 42 | Bulb Switcher | algorithm | Given n bulbs toggled over n rounds count how many remain on | solution | 2026-06-22 |
| 43 | Intersection of Two Arrays II | algorithm | Given two integer arrays return their intersection including duplicate occurrences | solution | 2026-06-23 |
| 44 | Factorial Trailing Zeroes | algorithm | Given an integer n return the number of trailing zeroes in n factorial | solution | 2026-06-23 |
| 45 | Majority Element | algorithm | Given an integer array return the element that appears more than half of the time | solution | 2026-06-24 |
| 46 | Single Number | algorithm | Given a non-empty integer array where every element appears twice except one return the element that appears once | solution | 2026-06-26 |
| 47 | Baseball Game | algorithm | Given a list of baseball scoring operations calculate the final score | solution | 2026-06-29 |
| 48 | Backspace String Compare | algorithm | Given two strings containing backspace characters determine whether they are equal after processing backspaces | solution | 2026-06-30 |
| 49 | Remove All Adjacent Duplicates In String | algorithm | Given a string remove adjacent duplicate pairs repeatedly until no such pair remains | solution | 2026-07-01 |
| 50 | Make The String Great | algorithm | Given a string remove adjacent same-letter characters with different cases until no such pair remains | solution | 2026-07-02 |
| 51 | Clear Digits | algorithm | Given a string remove each digit and the closest non-digit character to its left | solution | 2026-07-03 |
| 52 | Crawler Log Folder | algorithm | Given folder change logs return the minimum operations needed to go back to the main folder | solution | 2026-07-05 |
| 53 | Build an Array With Stack Operations | algorithm | Given a target array and n return the stack operations needed to build target from numbers 1 to n | solution | 2026-07-06 |
| 54 | Next Greater Element I | algorithm | Given two arrays nums1 and nums2 find the next greater element in nums2 for each value in nums1 | solution | 2026-07-07 |
| 55 | Final Prices With a Special Discount in a Shop | algorithm | Given item prices apply the first later price that is less than or equal as a discount | solution | 2026-07-08 |
| 56 | Daily Temperatures | algorithm | Given daily temperatures return how many days each day must wait until a warmer temperature | solution | 2026-07-09 |
| 57 | Online Stock Span | algorithm | Given a stream of daily stock prices return the span of each price compared with consecutive previous prices | solution | 2026-07-13 |
| 58 | Merge Strings Alternately | algorithm | Given two strings merge them by alternating characters and appending any remaining suffix | solution | 2026-07-15 |
| 59 | Reverse Vowels of a String | algorithm | Given a string reverse only the vowels while keeping all other characters in place | solution | 2026-07-16 |
| 60 | Valid Palindrome II | algorithm | Given a string determine whether it can become a palindrome after deleting at most one character | solution | 2026-07-17 |
| 61 | Is Subsequence | algorithm | Given two strings determine whether the first is a subsequence of the second | solution | 2026-07-20 |
Intro
A personal problem archive — algorithms, single-cell biology, research design, one problem at a time.
Problems
Not every problem has an obvious answer — and that’s the point. Each one is a small mystery waiting to be solved, one clue at a time. The archive grows slowly, but so does the intuition behind it. No rush. Sherlock didn’t solve cases in a day either.