LeetCode 216: Combination Sum III

Today, let’s look at LeetCode problem 216: Combination Sum III. The instructions are as follows: Find all valid combinations of \(k\) numbers that sum up to \(n\) such that the following conditions are true: Only numbers 1 through 9 are used. Each number is used at most once. Return a list of all possible valid combinations. The list must not contain the same combination twice, and the combinations may be returned in any order. ...

December 28, 2025 · 4 min · David Nabergoj

LeetCode 790: Domino and Tromino Tiling

Today, let’s look at LeetCode problem 790: Domino and Tromino Tiling. The instructions are as follows: You have two types of tiles: a 2 x 1 domino shape and a tromino shape. You may rotate these shapes. Given an integer \(n\), return the number of ways to tile an 2 x n board. Since the answer may be very large, return it modulo 10^9 + 7. In a tiling, every square must be covered by a tile. Two tilings are different if and only if there are two 4-directionally adjacent cells on the board such that exactly one of the tilings has both squares occupied by a tile. ...

December 28, 2025 · 5 min · David Nabergoj

LeetCode 875: Koko Eating Bananas

Today, let’s look at LeetCode problem 875: Koko Eating Bananas. The instructions are as follows: Koko loves to eat bananas. There are n piles of bananas, the \(i\)-th pile has piles[i] bananas. The guards have gone and will come back in h hours. Koko can decide her bananas-per-hour eating speed of k. Each hour, she chooses some pile of bananas and eats k bananas from that pile. If the pile has less than k bananas, she eats all of them instead and will not eat any more bananas during this hour. Koko likes to eat slowly but still wants to finish eating all the bananas before the guards return. Return the minimum integer k such that she can eat all the bananas within h hours. ...

December 28, 2025 · 4 min · David Nabergoj

LeetCode 72: Edit distance

Today, let’s look at LeetCode problem 72: Edit distance. The instructions are as follows: Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. You have the following three operations permitted on a word: Insert a character Delete a character Replace a character Let’s dive in! The Wagner-Fischer algorithm There are several types of edit distance. This LeetCode problem defines it as the Levenshtein distance. The most common algorithm to compute it is the Wagner-Fischer algorithm. ...

December 27, 2025 · 5 min · David Nabergoj

LeetCode 746: Min Cost Climbing Stairs

Today, let’s look at LeetCode problem 746: Min Cost Climbing Stairs. The instructions are as follows: You are given an integer array cost where cost[i] is the cost of \(i\)-th step on a staircase. Once you pay the cost, you can either climb one or two steps. You can either start from the step with index 0, or the step with index 1. Return the minimum cost to reach the top of the floor. ...

December 27, 2025 · 2 min · David Nabergoj