摘要: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Input: "babad" Output: 阅读全文
posted @ 2019-05-04 19:45 promise。 阅读(91) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty string s and a dictionary wordDict containing a list of non-emptywords, determine if s can be segmented into a space-separated seque 阅读全文
posted @ 2019-04-13 20:49 promise。 阅读(67) 评论(0) 推荐(0) 编辑
摘要: Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1: Input: haystac 阅读全文
posted @ 2019-04-09 20:32 promise。 阅读(86) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. Your algorithm should run in O(n) complexity. Examp 阅读全文
posted @ 2019-04-02 20:57 promise。 阅读(81) 评论(0) 推荐(0) 编辑
摘要: Given an integer array nums, return the number of range sums that lie in [lower, upper] inclusive.Range sum S(i, j) is defined as the sum of the eleme 阅读全文
posted @ 2019-03-30 19:22 promise。 阅读(120) 评论(0) 推荐(0) 编辑