1.1. 问题 Problem You need to deal with data that doesn‘t fit in the ASCII character set. 你需要处理不适合用ASCII字符集表示的数据. 1.2. 解决 Solution Unicode strings can be encoded in plain strings...
分类:
编程语言 时间:
2015-04-15 15:10:33
阅读次数:
223
Redis是一个开源, BSD许可和高级键值缓存和存储。由于键能包含strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs, 所以它经常被称为数据结构服务器。 你可以在这些类型上进行原子操作,如附加到一个字符串;递增哈希中的值;将元素放入列表;进行集合的交,并和差运算;或者从排序集合中获得排在最前面的成员。...
分类:
其他好文 时间:
2015-04-15 09:41:35
阅读次数:
194
Write a method anagram(s,t) to decide if two strings are anagrams or not.ExampleGiven s="abcd", t="dcab", return trueO(N)time, O(1) space 1 public cla...
分类:
其他好文 时间:
2015-04-15 07:12:54
阅读次数:
104
Compare two version numbers version1 and version2.
If version1 > version2 return 1, if version1 version2 return -1, otherwise return 0.
You may assume that the version strings are non-empty and cont...
分类:
其他好文 时间:
2015-04-14 09:59:01
阅读次数:
136
classStringTest{ publicstaticvoidmain(String[]args){Strings=newString("abc");Strings1="abc";Strings2=newString("abc");System.out.println(s==s1);System...
分类:
其他好文 时间:
2015-04-13 18:52:08
阅读次数:
151
一、实现Android国际化,分为两步:1、在工程的res目录下创建不同国家和语种的资源目录(values或drawable),系统会根据设备当前的语言环境自动选择相应的资源文件。2、翻译各国语言的文字,放入不同国家和语句的资源目录,即strings.xml或arrays.xml。二、工具实现原理介...
分类:
移动开发 时间:
2015-04-13 14:16:20
阅读次数:
237
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".博主对于自己那冗长的代码真是累感不爱了~连注释都不用标了,特别清晰明了,捂脸逃走~只能安慰自己...
分类:
其他好文 时间:
2015-04-13 06:51:00
阅读次数:
107
描述:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest...
分类:
其他好文 时间:
2015-04-12 20:54:09
阅读次数:
137
Write a function to find the longest common prefix string amongst an array of strings.Analyse: 找一些序列的最长前缀子序列。 1 class Solution { 2 public: 3 strin...
分类:
其他好文 时间:
2015-04-12 16:09:54
阅读次数:
110
Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.solution:直接乘会超时~~所以只能用递归~~public clas...
分类:
其他好文 时间:
2015-04-11 07:50:41
阅读次数:
132