c*******a 发帖数: 1879 | 1 【 以下文字转载自 JobHunting 讨论区 】
发信人: centralla (central LA), 信区: JobHunting
标 题: 这道面试题要是ONSITE
发信站: BBS 未名空间站 (Sat Apr 7 21:05:59 2018, 美东)
最少要20分钟才能写出最优(时间和空间复杂度)并且无虫的算法来?
=================
Given a string s, partition s such that every substring of the partition is
a palindrome.
Retur n all possible palindrome partitioning of s.
For example, given s = "aab", Retur n
[
[ " aa" , " b" ],
[ " a" , " a" , " b" ]
] |
|