原题地址:https://oj.leetcode.com/problems/multiply-strings/题意:Given
two numbers represented as strings, return multiplication of the numbers as a
string.N...
分类:
编程语言 时间:
2014-06-12 21:43:03
阅读次数:
344
Given an array of strings, return all groups of
strings that are anagrams.Note: All inputs will be in lower-case.题解:
判断字符串是否为回文构词法生成的。找出所有由同一回文构词法生成的字...
分类:
其他好文 时间:
2014-06-12 13:51:32
阅读次数:
200
题目
Given two binary strings, return their sum (also a binary string).
For example,
a = "11"
b = "1"
Return "100".
方法
从后往前,每个字符进行判断。
public String addBinary(String a, String...
分类:
其他好文 时间:
2014-06-10 17:50:48
阅读次数:
241
原题地址:https://oj.leetcode.com/problems/longest-common-prefix/题意:Write
a function to find the longest common prefix string amongst an array of
strings.解...
分类:
编程语言 时间:
2014-06-10 16:31:52
阅读次数:
261
戳我去解题Given an array of strings, return all
groups of strings that are anagrams.Note: All inputs will be in
lower-case.Anagram(回文构词法)是指打乱字母顺序从而得到新的单词回文...
分类:
其他好文 时间:
2014-06-10 08:44:13
阅读次数:
275
戳我去解题Write a function to find the longest
common prefix string amongst an array of strings.class Solution {public: string
longestCommonPrefix(vecto...
分类:
其他好文 时间:
2014-06-10 08:29:55
阅读次数:
189
题目描述:
Write a function to find the longest common prefix string amongst an
array of strings.
很简单的一道题目,但是我写了两个不一样的版本,运行时间确实数倍之差。。贴代码如下:
版本1:
{CSDN:CODE:384511}
这个版本的运行时间为 44 ms...
分类:
其他好文 时间:
2014-06-10 08:18:58
阅读次数:
291
一次总结两道题,两道题目都比较基础Description:Write a function to
find the longest common prefix string amongst an array of strings.分析:
这道题目最重要的知道什么叫prefix前缀, 否则一不小心就做...
分类:
其他好文 时间:
2014-06-09 21:08:16
阅读次数:
224
字符串和字符A string is an ordered collection of
characters, such as "hello, world" or "albatross". Swift strings are represented
by the String type, which ...
分类:
其他好文 时间:
2014-06-08 19:43:21
阅读次数:
247