Dynamic ProgrammingI will create a detailed markdown document covering all major Dynamic Programming (DP) patterns. Each pattern will include: A brief summary explaining its significance and when to use it. Common techniques and tricks to solve problems under this pa...Mar 20, 2025 · 84 min readlietnode.hashnode.dev
Climbing Stairs1. Introduction to Dynamic Programming Dynamic Programming (DP) is a problem-solving technique that involves breaking a complex problem into simpler overlapping subproblems and solving each subproblem only once. In other words, DP trades redundant co...Mar 20, 2025 · 84 min readlietcode.hashnode.dev
Minimum Operations to Make a SubsequenceYou are given an array target that consists of distinct integers and another integer array arr that can have duplicates. In one operation, you can insert any integer at any position in arr. For example, if arr = [1,4,1,2], you can add 3 in the middle...Mar 8, 2025 · 4 min readlogiclab.hashnode.dev
Evaluate Division - BFSYou are given an array of variable pairs equations and an array of real numbers values, where equations[i] = [A<sub>i</sub>, B<sub>i</sub>] and values[i] represent the equation A<sub>i</sub> / B<sub>i</sub> = values[i]. Each A<sub>i</sub> or B<sub>i<...Jun 30, 2024 · 4 min readlietcode.hashnode.dev
Word Ladder II - BFSA transformation sequence from word beginWord to word endWord using a dictionary wordList is a sequence of words beginWord -> s<sub>1</sub> -> s<sub>2</sub> -> ... -> s<sub>k</sub> such that: Every adjacent pair of words differs by a single letter. ...Jun 30, 2024 · 4 min readlietcode.hashnode.dev