随笔分类 - String
摘要:Regular Expression Matching Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:Given an expression string array, return the Reverse Polish notation of this expression. (remove the parentheses) Given an expression string array, re
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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/
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:Valid Parentheses Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. Example The b
阅读全文
摘要:Given a string containing only digits, restore it by returning all possible valid IP address combinations. Given a string containing only digits, rest
阅读全文
摘要: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
阅读全文
摘要:Given two binary strings, return their sum (also a binary string). Example a = 11 b = 1 Return 100 分析: 这个和10进制加法一样。 total = a + b + carryover; digit =
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号