子串
文章平均质量分 74
jmspan
这个作者很懒,什么都没留下…
展开
-
LeetCode 3. Longest Substring Without Repeating Characters(最长不重复子串)
原题网址:https://leetcode.com/problems/longest-substring-without-repeating-characters/ Given a string, find the length of the longest substring without repeating characters. Examples: Given "ab原创 2016-05-01 07:12:41 · 446 阅读 · 0 评论 -
LeetCode 159. Longest Substring with At Most Two Distinct Characters(最长字串)
原题网址:https://leetcode.com/problems/longest-substring-with-at-most-two-distinct-characters/ Given a string, find the length of the longest substring T that contains at most 2 distinct characters.原创 2016-05-26 00:54:39 · 561 阅读 · 0 评论 -
LeetCode 5. Longest Palindromic Substring(最长回文子串)
原题网址:https://leetcode.com/problems/longest-palindromic-substring/ Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there e原创 2016-05-19 03:25:31 · 474 阅读 · 0 评论 -
LeetCode 14. Longest Common Prefix(最长公共前缀)
原题网址:https://leetcode.com/problems/longest-common-prefix/ Write a function to find the longest common prefix string amongst an array of strings. 方法一:暴力求解。 public class Solution { public Strin原创 2016-05-19 05:51:55 · 683 阅读 · 0 评论 -
LeetCode 30. Substring with Concatenation of All Words(单词连接)
原题网址:https://leetcode.com/problems/substring-with-concatenation-of-all-words/ You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of原创 2016-05-20 10:35:51 · 316 阅读 · 0 评论 -
LeetCode 79. Word Search(单词查找)
原题网址:https://leetcode.com/problems/word-search/ Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where原创 2016-05-22 05:21:03 · 1147 阅读 · 0 评论 -
HackRank Two Two
原题网址:https://www.hackerrank.com/challenges/two-two Prof. Twotwo as the name suggests is very fond powers of 2. Moreover he also has special affinity to number 800. He is known for carrying quirky e原创 2016-07-11 04:36:29 · 1057 阅读 · 0 评论 -
LeetCode 28. Implement strStr()(实现子串定位)
原题网址:https://leetcode.com/problems/implement-strstr/ Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 方法:KMP算法。 p原创 2016-05-20 10:35:48 · 803 阅读 · 0 评论 -
LeetCode 115. Distinct Subsequences(子序列数量)
原题网址:https://leetcode.com/problems/distinct-subsequences/ Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequence of a string is a new string which原创 2016-05-24 00:19:33 · 499 阅读 · 0 评论