摘要: Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This 阅读全文
posted @ 2017-11-29 20:56 Zzz...y 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: 寻找最长回文字符串。 用动态规划。dp[i][j] 阅读全文
posted @ 2017-11-29 15:01 Zzz...y 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Given a string, your task is to count how many palindromic substrings in this string. The substrings with different start indexes or end indexes are c 阅读全文
posted @ 2017-11-29 14:55 Zzz...y 阅读(162) 评论(0) 推荐(0) 编辑
摘要: Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example,Given n = 3, there are a total of 5 unique BST' 阅读全文
posted @ 2017-11-29 14:48 Zzz...y 阅读(110) 评论(0) 推荐(0) 编辑