Hi there 馃憢

This blog is intended to share my knowledge about software architecture, system design, tools, and techniques for producing high-quality products.

LeetCode - 150 - Regular Expression Matching

The problem Given an input string s and a pattern p, implement regular expression matching with support for '.' and '*', where: '.' matches any single character. '*' matches zero or more of the preceding element. Return a boolean indicating whether the matching covers the entire input string (not partial). Example 1: Input: s = "aa", p = "a" Output: false Explanation: "a" does not match the entire string "aa". Example 2: ...

April 19, 2026 路 5 min 路 Dmytro Chumakov

LeetCode - 150 - Burst Balloons

The problem You are given n balloons, indexed from 0 to n - 1. Each balloon is painted with a number on it, represented by an array nums. You are asked to burst all the balloons. If you burst the ith balloon, you will get nums[i - 1] * nums[i] * nums[i + 1] coins. If i - 1 or i + 1 goes out of bounds of the array, then treat it as if there is a balloon with a 1 painted on it. ...

April 9, 2026 路 5 min 路 Dmytro Chumakov

LeetCode - 150 - Distinct Subsequences

The problem Given two strings s and t, return the number of distinct subsequences of s which equals t. The test cases are generated so that the answer fits in a 32-bit signed integer. Example 1: Input: s = "rabbbit", t = "rabbit" Output: 3 Explanation: As shown below, there are 3 ways you can generate "rabbit" from s. rabbbit rabbbit rabbbit Example 2: Input: s = "babgbag", t = "bag" Output: 5 Explanation: As shown below, there are 5 ways you can generate "bag" from s. babgbag babgbag babgbag babgbag babgbag Constraints: ...

April 1, 2026 路 6 min 路 Dmytro Chumakov

LeetCode - 150 - Longest Increasing Path in a Matrix

The problem Given an m x n integer matrix, return the length of the longest increasing path in matrix. From each cell, you can either move in four directions: left, right, up, or down. You may not move diagonally or move outside the boundary (i.e., wrap-around is not allowed). Example 1: Input: matrix = [[9,9,4],[6,6,8],[2,1,1]] Output: 4 Explanation: The longest increasing path is [1, 2, 6, 9]. Example 2: ...

March 23, 2026 路 4 min 路 Dmytro Chumakov

LeetCode - 150 - Edit Distance

LeetCode - 150 - Edit Distance The problem 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 Example 1: Input: word1 = "horse", word2 = "ros" Output: 3 Explanation: horse -> rorse (replace 'h' with 'r') rorse -> rose (remove 'r') rose -> ros (remove 'e') Example 2: ...

March 18, 2026 路 7 min 路 Dmytro Chumakov