摘要:
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 n 阅读全文
摘要:
原文:http://dev.yesky.com/393/3007393.shtmlconst修饰普通变量和指针const修饰变量,一般有两种写法:const TYPE value;TYPE const value;这两种写法在本质上是一样的。它的含义是:const修饰的类型为TYPE的变量value... 阅读全文
摘要:
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 containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the lo 阅读全文
摘要:
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 阅读全文
摘要:
题目描述Edit DistanceGiven two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 阅读全文
摘要:
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 an absolute path for a file (Unix-style), simplify it. For example,path = "/home/", => "/home"path = "/a/./b/../../c/", => "/c" click to show co 阅读全文
摘要:
Given a string containing only digits, restore it by returning all possible valid IP address combinations. For example: Given "25525511135", return [" 阅读全文
摘要:
int转string的方法类似··············· 但是int到string的转换最简单粗暴的方法就是用to_string(). 把一个字符加入到string的末尾 直接用string的+就行了,以前不能用append,因为append需要传入的是字符串类型,字符类型不管用。 阅读全文