面试场景
高频考察问题建模、边界条件与口头表达的清晰度。
常见误区
只背模板不解释为什么,容易在追问里失分。
练习策略
每轮练 3-5 题,固定复盘复杂度和可替代解法。
推荐练习顺序
题库
动态规划 题库
先展示一段最适合快速浏览的题目列表,继续滚动时再慢慢续载,避免专题页被长列表一下子拉穿。
慢加载专题题库
适合这类题很多的专题,先扫结构,再逐步深入。
当前展示 24 / 529 道题目
每次续载 24 题最长回文子串
Find the longest contiguous palindromic substring in a given string using dynamic programming and two-pointer expansion …
正则表达式匹配
The Regular Expression Matching problem involves checking if a string matches a pattern using '.' and '*'.
括号生成
Generate Parentheses requires generating all valid combinations of parentheses with given pairs using backtracking and s…
最长有效括号
Compute the length of the longest well-formed parentheses substring using state transition dynamic programming and stack…
接雨水
Calculate the total trapped rain water using the elevation map array, leveraging dynamic programming and two-pointer pat…
通配符匹配
Implement full wildcard pattern matching using '?' and '*' by applying state transition dynamic programming with careful…
跳跃游戏 II
Jump Game II requires finding the minimum jumps to reach the end of an array using dynamic programming and greedy techni…
最大子数组和
Maximum Subarray is a classic state transition dynamic programming problem about deciding whether to extend or restart a…
跳跃游戏
Solve the Jump Game problem using state transition dynamic programming to determine if you can reach the last index of t…
不同路径
Calculate the number of unique paths for a robot to move on an m x n grid with only right and down movements.
不同路径 II
Calculate the number of unique paths from top-left to bottom-right in a grid with obstacles using dynamic programming st…
最小路径和
Compute the minimum sum from top-left to bottom-right in a grid using state transition dynamic programming efficiently.
爬楼梯
Climbing Stairs is a classic dynamic programming problem where you calculate distinct ways to reach the top using step t…
编辑距离
Determine the minimum number of insertions, deletions, or replacements to transform one string into another using dynami…
最大矩形
Compute the largest rectangle of 1's in a binary matrix using dynamic programming and stack-based state transitions effi…
扰乱字符串
Scramble String is a dynamic programming problem where we determine if one string can be scrambled to form another using…
解码方法
Decode Ways is a dynamic programming problem focused on decoding a numeric string to letters using specific mappings.
不同的二叉搜索树 II
Generate all structurally unique BSTs with values 1 to n using backtracking and recursive tree construction techniques.
不同的二叉搜索树
Given n nodes, calculate the number of unique binary search trees (BSTs) that can be formed with values from 1 to n.
交错字符串
The Interleaving String problem requires determining if a string can be formed by interleaving two others, utilizing dyn…
不同的子序列
Compute the number of distinct subsequences of one string matching another using precise state transition dynamic progra…
杨辉三角
Generate the first numRows of Pascal's Triangle using dynamic programming with clear state transitions and array manipul…
杨辉三角 II
Compute the specific row of Pascal's Triangle using efficient state transition dynamic programming with array-based upda…
三角形最小路径和
Given a triangle, return the minimum path sum from top to bottom, moving to adjacent numbers in the row below.
swap_vert在题库框内继续向下滚动,也会自动续载