热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

面试准备

模拟考试

设为首页

收藏此页面

订阅邮箱地址

Dynamic Programming 面试题与答案

问题 11. Maximum Product Subarray

Find the contiguous subarray within an array (containing at least one number) that has the largest product.

Example:

Input: [2, 3, -2, 4], Output: 6 (subarray [2, 3])

这有帮助吗? 添加评论 查看评论
 

问题 12. Decode Ways

A message containing letters from A-Z can be encoded into numbers. Given a non-empty string containing only digits, determine the total number of ways to decode it.

Example:

Input: "226", Output: 3 ("22" can be decoded as "BB", "2" + "2" + "6" can be decoded as "VVF")

这有帮助吗? 添加评论 查看评论
 

问题 13. Word Break Problem

Given a non-empty string and a dictionary of words, determine if the string can be segmented into a space-separated sequence of one or more dictionary words.

Example:

Input: s = "leetcode", wordDict = ["leet", "code"], Output: true

这有帮助吗? 添加评论 查看评论
 

问题 14. Count Palindromic Subsequences

Given a string, find the number of distinct palindromic subsequences of it.

Example:

Input: "bccb", Output: 6 ("b", "c", "c", "b", "ccb", "bccb")

这有帮助吗? 添加评论 查看评论
 

问题 15. Minimum Path Sum

Given a grid filled with non-negative numbers, find a path from the top-left to the bottom-right corner that minimizes the sum of numbers along the path.

Example:

Grid: [[1,3,1],[1,5,1],[4,2,1]], Output: 7 (1 -> 3 -> 1 -> 1 -> 1)

这有帮助吗? 添加评论 查看评论
 

用户评价最有帮助的内容:

版权所有 © 2026,WithoutBook。