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

LeetCode 714: Best Time to Buy and Sell Stock with Transaction Fee

Welcome back to another LeetCode walkthrough! Let’s look at LeetCode problem 714. We’re given an array of stock prices. Each day, we can either buy a stock if we have none or sell a stock we own (but not both). When we sell a stock, we have to pay a transaction fee. We want to find the maximum profit we can achieve. We approach this using dynamic programming. Let’s dive in! ...

December 14, 2025 · 4 min · David Nabergoj

LeetCode 1143: Longest Common Subsequence

In this post, we’ll be solving LeetCode problem 1143. We have two strings text1 and text2 with sizes \(n\) and \(m\), respectively. We want to find the length of their longest common subsequence (LCS). A subsequence of a string s is obtained by deleting zero or more characters from s. Strategy Let’s assume we have two strings: s1 with size n1 and s2 with size n2. Let’s also assume we know their LCS length. What can we say about LCS length when we append a character c1 to s1 and a character c2 to s2? ...

December 4, 2025 · 5 min · David Nabergoj