![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
string
文章平均质量分 76
likecool21
这个作者很懒,什么都没留下…
展开
-
LeetCode刷题笔录Valid Parentheses
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the correct order, "()" and "()[]{}" are all va原创 2014-07-18 03:59:38 · 627 阅读 · 0 评论 -
LeetCode刷题笔录Wildcard Matching
Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single character. '*' Matches any sequence of characters (including the empty sequence). The matching should cover t原创 2014-11-07 08:01:15 · 612 阅读 · 0 评论 -
LeetCode刷题笔录Reverse Words in a String
https://oj.leetcode.com/problems/reverse-words-in-a-string/ 我的做法是从后往前扫描,遇到空格就原创 2014-10-16 12:34:14 · 754 阅读 · 0 评论 -
LeetCode刷题笔录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. Corner Cases: Did原创 2014-10-30 08:19:00 · 616 阅读 · 0 评论 -
LeetCode刷题笔录Length of Last Word
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word does not exist, return 0. Note: A word is原创 2014-10-03 04:22:47 · 539 阅读 · 0 评论 -
LeetCode刷题笔录Longest Valid Parentheses
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the longest valid parentheses substring is "()",原创 2014-11-07 15:15:14 · 713 阅读 · 0 评论 -
LeetCode刷题笔录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 is formed from the original string by deleting some (can be non原创 2014-09-03 05:03:55 · 507 阅读 · 0 评论 -
LeetCode刷题笔录Add Binary
Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". 具体一位一位地加就行了,考虑进位的问题。还有最后记得把生成的string反过来再返回,因为我们是从最低位开始加的。 public class Solu原创 2014-08-30 00:51:31 · 1056 阅读 · 0 评论 -
LeetCode刷题笔录Count and Say
The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11. 11 is read off as "two 1s" or 21. 21 is read off as原创 2014-08-29 11:57:32 · 580 阅读 · 0 评论 -
LeetCode刷题笔录Roman to Integer
Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 和Integer to Roman那题一样挺无聊的。原创 2014-08-22 05:46:30 · 586 阅读 · 0 评论 -
LeetCode刷题笔录String to Integer (atoi)
Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input ca原创 2014-08-09 00:36:31 · 721 阅读 · 0 评论 -
LeetCode刷题笔录Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings. bu原创 2014-08-01 23:29:36 · 897 阅读 · 0 评论 -
LeetCode刷题笔录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原创 2014-12-16 06:46:06 · 655 阅读 · 0 评论