Write a function to find the longest common prefix string amongst an array of strings.
我的解决方案:
class Solution {
public:
string longestCommonPrefix(vector& strs)
{...
分类:
其他好文 时间:
2015-06-30 00:07:21
阅读次数:
144
1. String difference(final String str1, final String str2)
说明:Compares two Strings, and returns the portion where they differ.
i.e:
("ahc", "bcu") -> "ahbu"
/**
*
* @Title: differen...
分类:
编程语言 时间:
2015-06-29 20:35:07
阅读次数:
138
NSJSONReadingMutableContainers
Specifies that arrays and dictionaries are created as mutable objects. // 创建可变的数组或字典 接收
NSJSONReadingMutableLeaves
Specifies that leaf strings in the JSON o...
分类:
Web程序 时间:
2015-06-29 20:34:07
阅读次数:
141
问题描述:
Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.
例如:输入为:{abc,bca,123,321,567}
输出为:{abc,bca,123,321}
解决方案:class Sol...
分类:
其他好文 时间:
2015-06-29 20:28:33
阅读次数:
102
staticvoidMain(string[] args){strings="";//(1)字符访问(下标访问s[i]) s="ABCD"; Console.WriteLine(s[0]);//输出"A"; Console.WriteLine(s.Length);//输出4 Console.Writ...
问题描述:Given two binary strings, return their sum (also a binary string).For example,
a = “11”
b = “1”
Return “100”.
解决方案:class Solution {
public:
string addBinary(string a, string b) {
i...
分类:
其他好文 时间:
2015-06-29 17:06:23
阅读次数:
101
1 class Solution { 2 public: 3 /** 4 * @param strs: A list of strings 5 * @return: The longest common prefix 6 */ 7 string...
分类:
其他好文 时间:
2015-06-29 16:36:19
阅读次数:
197
问题:当我们开发完成一个Android应用程序后,在发布该应用程序之前必须要经过的一步时打包应用程序。
至于从打包程序到发布的完整过程可以参考: Android 应用程序发布流程---碗豆荚发布流程
选择Eclipse ADT打包应用程序的过程如下:
可是在这时,会出现如下提示:
并且原本没有错误的程序(values/strings.xml)也会出现...
分类:
移动开发 时间:
2015-06-29 14:57:32
阅读次数:
222
1. Brief ES6(ECMAScript 6th edition)于2015年7月份发布,虽然各大浏览器仍未全面支持ES6,但我们可以在后端通过Node.js 0.12和io.js,而前端则通过Traceur或Babel这类Transpiler将ES6语法预转译为ES5语法,来提前兴奋一把。而...
分类:
其他好文 时间:
2015-06-29 14:29:37
阅读次数:
141
Given two stringssandt, determine if they are isomorphic.Two strings are isomorphic if the characters inscan be replaced to gett.All occurrences of a ...
分类:
其他好文 时间:
2015-06-29 13:21:20
阅读次数:
99