算法描述: Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. Exam ...
分类:
其他好文 时间:
2019-02-05 22:07:25
阅读次数:
153
题目:给定一个字符串,请你找出其中不含有重复字符的 最长子串 的长度。 示例 1: 示例 2: 示例 3: 解法: 滑动窗口思想 ...
分类:
其他好文 时间:
2019-02-04 18:16:03
阅读次数:
192
A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence ( a1, a2, ..., aN) be any sequence ( ai1, ...
分类:
其他好文 时间:
2019-02-03 18:04:16
阅读次数:
192
题意 A string is finite sequence of characters over a non empty finite set Σ. In this problem, Σ is the set of lowercase letters. Substring, also called ...
分类:
其他好文 时间:
2019-02-01 23:30:09
阅读次数:
205
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. Example 1: Exampl ...
分类:
其他好文 时间:
2019-02-01 19:50:13
阅读次数:
125
算法描述: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserv ...
分类:
其他好文 时间:
2019-02-01 14:19:34
阅读次数:
158
算法描述: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Example 1: Examp ...
分类:
其他好文 时间:
2019-02-01 14:12:17
阅读次数:
161
算法描述: Given an array of strings, group anagrams together. Example: Note: All inputs will be in lowercase. The order of your output does not matter. 解题 ...
分类:
其他好文 时间:
2019-01-29 20:47:18
阅读次数:
200
3. Longest Substring Without Repeating Characters 1)题目 2)思路 先写一个子函数,输入数组下标,母字符串,往后遍历,获得下标出最长子串长度。 遍历母字符串,调用子函数,获得每一位长度,放入数组里。 获取数组最大值。 3) 代码 public in ...
分类:
其他好文 时间:
2019-01-28 00:58:44
阅读次数:
200
5. Longest Palindromic Substring 1)题目 2)思路 遍历s, 判断每一位为中间位的最大回文子串。 比较即可。 3) 代码 4) 结果 时间复杂度:O(n^2) 空间复杂度:O(n) 耗时: 5) 调优 ...
分类:
其他好文 时间:
2019-01-28 00:56:12
阅读次数:
144