Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, giv...
分类:
编程语言 时间:
2014-10-26 11:31:30
阅读次数:
243
Solution: when see question about two strings , DP should be considered first.We can abstract this question to calculate appear times for string T wit...
分类:
其他好文 时间:
2014-10-26 00:12:57
阅读次数:
211
Given two numbers represented as strings, return multiplication of the numbers as a string.
Note: The numbers can be arbitrarily large and are non-negative.
class Solution {
public:
std::str...
分类:
其他好文 时间:
2014-10-25 09:21:02
阅读次数:
155
Write a function to find the longest common prefix string amongst an array of strings.题目言简意赅,貌似也不难,暴力法用一个char *数组存放strs里每个元素的起始地址,然后循环,同时把所有指针向前移动,如果有...
分类:
其他好文 时间:
2014-10-25 00:52:44
阅读次数:
265
Language:
Default
Power Strings
Time Limit: 3000MS
Memory Limit: 65536K
Total Submissions: 33205
Accepted: 13804
Description
Given two strings a and b we define a...
分类:
其他好文 时间:
2014-10-23 22:50:27
阅读次数:
198
Language:Power StringsTime Limit:3000MSMemory Limit:65536KTotal Submissions:33205Accepted:13804DescriptionGiven two strings a and b we define a*b to b...
分类:
其他好文 时间:
2014-10-23 20:41:22
阅读次数:
215
Given two binary strings, return their sum (also a binary string).
For example,
a = "11"
b = "1"
Return "100".
Show Tags
Have you been asked this question in an interview?
...
分类:
其他好文 时间:
2014-10-23 17:47:23
阅读次数:
229
Given an array of strings, return all groups of strings that are anagrams.
Note: All inputs will be in lower-case.
class Solution {
public:
std::vector anagrams(std::vector &strs) {
...
分类:
其他好文 时间:
2014-10-23 09:33:28
阅读次数:
173
Write a function to find the longest common prefix string amongst an array of strings. 1 class Solution { 2 public: 3 string longestCommonPrefix(v...
分类:
其他好文 时间:
2014-10-22 17:30:53
阅读次数:
228
x = "There are %d types of people." % 10binary = "binary"do_not = "don't"y = "Those who know %s and those who %s." % (binary, do_not)print xprint ypri...
分类:
其他好文 时间:
2014-10-22 14:22:51
阅读次数:
122