Kata

A personal problem archive — algorithms, single-cell biology, research design, one problem at a time.

Problems

# 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

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.