随笔分类 -  String

摘要:Regular Expression Matching Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or 阅读全文
posted @ 2016-07-23 02:51 北叶青藤 阅读(212) 评论(0) 推荐(0)
摘要:The structure of Expression Tree is a binary tree to evaluate certain expressions.All leaves of the Expression Tree have an number string value. All n 阅读全文
posted @ 2016-07-22 07:53 北叶青藤 阅读(452) 评论(0) 推荐(0)
摘要:Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below is one possible representati 阅读全文
posted @ 2016-07-21 23:00 北叶青藤 阅读(229) 评论(0) 推荐(0)
摘要:Given an expression string array, return the Reverse Polish notation of this expression. (remove the parentheses) Given an expression string array, re 阅读全文
posted @ 2016-07-21 11:52 北叶青藤 阅读(306) 评论(0) 推荐(0)
摘要:Given three strings: s1, s2, s3, determine whether s3 is formed by the interleaving of s1 and s2. Given three strings: s1, s2, s3, determine whether s 阅读全文
posted @ 2016-07-19 02:21 北叶青藤 阅读(172) 评论(0) 推荐(0)
摘要:Word Ladder I Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that: Onl 阅读全文
posted @ 2016-07-18 07:03 北叶青藤 阅读(368) 评论(0) 推荐(0)
摘要:Given an absolute path for a file (Unix-style), simplify it. Have you met this question in a real interview? Yes Example "/home/", => "/home" "/a/./b/ 阅读全文
posted @ 2016-07-17 01:02 北叶青藤 阅读(218) 评论(0) 推荐(0)
摘要: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 t 阅读全文
posted @ 2016-07-16 11:39 北叶青藤 阅读(190) 评论(0) 推荐(0)
摘要:Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have 阅读全文
posted @ 2016-07-16 11:21 北叶青藤 阅读(199) 评论(0) 推荐(0)
摘要:Given a string source and a string target, find the minimum window in source which will contain all the characters in target. Notice If there is no su 阅读全文
posted @ 2016-07-16 05:04 北叶青藤 阅读(385) 评论(0) 推荐(0)
摘要:Given an array of strings, return all groups of strings that are anagrams. Notice All inputs will be in lower-case Given an array of strings, return a 阅读全文
posted @ 2016-07-16 00:22 北叶青藤 阅读(217) 评论(0) 推荐(0)
摘要:Given string A representative a positive integer which has N digits, remove any k digits of the number, the remaining digits are arranged according to 阅读全文
posted @ 2016-07-15 05:15 北叶青藤 阅读(169) 评论(0) 推荐(0)
摘要: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 longes 阅读全文
posted @ 2016-07-14 21:58 北叶青藤 阅读(149) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2016-07-13 11:13 北叶青藤 阅读(161) 评论(0) 推荐(0)
摘要:Valid Parentheses Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. Example The b 阅读全文
posted @ 2016-07-13 11:03 北叶青藤 阅读(260) 评论(0) 推荐(0)
摘要:Given a string containing only digits, restore it by returning all possible valid IP address combinations. Given a string containing only digits, rest 阅读全文
posted @ 2016-07-13 09:56 北叶青藤 阅读(206) 评论(0) 推荐(0)
摘要:A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded messag 阅读全文
posted @ 2016-07-12 02:45 北叶青藤 阅读(229) 评论(0) 推荐(0)
摘要:Given two binary strings, return their sum (also a binary string). Example a = 11 b = 1 Return 100 分析: 这个和10进制加法一样。 total = a + b + carryover; digit = 阅读全文
posted @ 2016-07-10 23:51 北叶青藤 阅读(172) 评论(0) 推荐(0)
摘要:Write a method to replace all spaces in a string with %20. The string is given in a characters array, you can assume it has enough space for replaceme 阅读全文
posted @ 2016-07-10 12:39 北叶青藤 阅读(214) 评论(0) 推荐(0)
摘要:Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. Given a st 阅读全文
posted @ 2016-07-09 09:23 北叶青藤 阅读(200) 评论(0) 推荐(0)