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

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

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

面试准备

Dynamic Programming 面试题与答案

问题 16. Longest Palindromic Substring

Given a string, find the longest substring which is a palindrome.

Example:

Input: "babad", Output: "bab" or "aba"

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

问题 17. Partition Equal Subset Sum

Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is equal.

Example:

Input: [1, 5, 11, 5], Output: true (subset sums: [1, 5, 5] and [11])

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

问题 18. Maximum Length of Repeated Subarray

Given two integer arrays, find the maximum length of a common subarray of both arrays.

Example:

Input: A = [1,2,3,2,1], B = [3,2,1,4,7], Output: 3 ([3, 2, 1])

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

问题 19. Longest Increasing Path in a Matrix

Given an integer matrix, find the length of the longest increasing path.

Example:

Matrix: [[9,9,4],[6,6,8],[2,1,1]], Output: 4 (9 -> 6 -> 8 -> 1)

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

问题 20. RegularExpression Matching

Implement regular expression matching with support for '.' and '*'.

Example:

Input: s = "aa", p = "a*", Output: true

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

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

版权所有 © 2026,WithoutBook。