
字符串
文章平均质量分 67
liuchenjane
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Simplify Path
Simplify Path Given an absolute path for a file (Unix-style), simplify it. For example, path = "/home/", => "/home" path = "/a/./b/../../c/", => "/c" click to show corner cases. Corn转载 2016-09-28 11:30:35 · 333 阅读 · 0 评论 -
536. Construct Binary Tree from String
You need to construct a binary tree from a string consisting of parenthesis and integers.The whole input represents a binary tree. It contains an integer followed by zero, one or two pairs of parenthes原创 2017-03-12 14:29:23 · 655 阅读 · 0 评论 -
97. Interleaving String
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.For example, Given: s1 = “aabcc”, s2 = “dbbca”,When s3 = “aadbbcbcac”, return true. When s3 = “aadbbbaccc”, return false原创 2017-02-25 21:51:39 · 313 阅读 · 0 评论 -
434. Number of Segments in a String
434. Number of Segments in a String Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-space characters. For example, Input: "Hello, my原创 2016-12-04 15:35:01 · 1341 阅读 · 0 评论 -
468. Validate IP Address
468. Validate IP Address In this problem, your job to write a function to check whether a input string is a valid IPv4 address or IPv6 address or neither. IPv4 addresses are canonically represente原创 2016-12-11 21:23:45 · 1124 阅读 · 1 评论 -
331. Verify Preorder Serialization of a Binary Tree
331. Verify Preorder Serialization of a Binary Tree One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we record the node's value. If it is a nul原创 2016-11-29 22:35:05 · 347 阅读 · 0 评论 -
451. Sort Characters By Frequency
451. Sort Characters By Frequency Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: "tree" Output: "eert" Explanation: 'e' appears twice wh原创 2016-11-02 09:35:27 · 1369 阅读 · 0 评论 -
459. Repeated Substring Pattern
459. Repeated Substring Patternk To on Given a non-empty string check if it can be constructed by taking a substring of it and appending multiple copies of the substring together. You may assume原创 2016-11-13 17:15:08 · 2101 阅读 · 0 评论 -
179. Largest Number
Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330.Note: The result may be very large,转载 2016-11-28 20:36:08 · 291 阅读 · 0 评论 -
151. Reverse Words in a String
151. Reverse Words in a String Given an input string, reverse the string word by word. For example, Given s = "the sky is blue", return "blue is sky the". Update (2015-02-12): For C prog原创 2016-10-27 20:06:07 · 424 阅读 · 0 评论 -
422. Valid Word Square
Given a sequence of words, check whether it forms a valid word square. A sequence of words forms a valid word square if the kth row and column read the exact same string, where 0 ≤ k Note: T原创 2016-10-16 15:43:10 · 856 阅读 · 0 评论 -
423. Reconstruct Original Digits from English
Given a non-empty string containing an out-of-order English representation of digits 0-9, output the digits in ascending order. Note: Input contains only lowercase English letters.Input is g原创 2016-10-16 15:39:38 · 719 阅读 · 0 评论 -
424. Longest Repeating Character Replacement
Given a string that consists of only uppercase English letters, you can replace any letter in the string with another letter at most k times. Find the length of a longest substring containing all repe原创 2016-10-16 15:34:09 · 1253 阅读 · 0 评论 -
395. Longest Substring with At Least K Repeating Characters
395. Longest Substring with At Least K Repeating Characters Find the length of the longest substring T of a given string (consists of lowercase letters only) such that every character in T appear转载 2016-10-24 21:59:04 · 313 阅读 · 0 评论 -
438. Find All Anagrams in a String
438. Find All Anagrams in a String Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and th原创 2016-10-23 17:17:41 · 2545 阅读 · 0 评论 -
388. Longest Absolute File Path
388. Longest Absolute File Path Suppose we abstract our file system by a string in the following manner: The string "dir\n\tsubdir1\n\tsubdir2\n\t\tfile.ext" represents: dir subdir1 s转载 2016-11-03 15:20:28 · 385 阅读 · 0 评论 -
Longest Palindromic Substring
Question Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.翻译 2016-09-14 15:42:00 · 535 阅读 · 0 评论 -
Longest Line of Consecutive One in Matrix
Given a 01 matrix M, find the longest line of consecutive one in the matrix. The line could be horizontal, vertical, diagonal or anti-diagonal.Example: Input: [[0,1,1,0], [0,1,1,0], [0,0,0,1]] O翻译 2017-04-23 21:12:44 · 962 阅读 · 0 评论