https://oj.leetcode.com/problems/repeated-dna-sequences/publicList<String>findRepeatedDnaSequences(Strings){
//Assumptions...
List<String>toReturn=newArrayList<>();
Set<String>seen=newHashSet<>();
for(inti=0;i<=s.length(..
分类:
其他好文 时间:
2015-02-26 00:04:28
阅读次数:
117
https://oj.leetcode.com/problems/anagrams/Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-...
分类:
其他好文 时间:
2015-02-25 22:22:18
阅读次数:
242
用Eclipse环境开发Android项目,如果编译时控制台报出“error: Apostrophe not preceded by \ (”这种错误,那么多半是因为项目中的一个strings.xml文件里有一个string标签中的字符串含有’,只要在’之前加\进行转义就可以解决这个错误,比如把I'...
分类:
移动开发 时间:
2015-02-25 16:48:48
阅读次数:
130
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".解题思路:这题比较基础,但想写对也不太容易。首先知道的一点,不能将数字直接Integer.pa...
分类:
其他好文 时间:
2015-02-24 21:02:42
阅读次数:
158
Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ofs...
分类:
其他好文 时间:
2015-02-24 13:43:16
阅读次数:
150
Problem DescriptionGenerally speaking, there are a lot of problems about strings processing. Now you encounter another such problem. If you get two strings, such as “asdf” and “sdfg”, the result of the...
分类:
其他好文 时间:
2015-02-23 16:46:39
阅读次数:
148
Write a function to find the longest common prefix string amongst an array of strings.思路分析:这题很简单,基本就是以第一个字符串为标准,同时扫描后面的字符串对应index 字符是否相同,找到最大的相同前缀。但是实现的时候还是要注意一些corner case,比如输入数组为空或者只包含一个字符串的情况。AC Co...
分类:
其他好文 时间:
2015-02-23 12:02:19
阅读次数:
145
Problem Description
There are two strings A and B with equal length. Both strings are made up of lower case letters. Now you have a powerful string painter. With the help of the painter, you can chan...
分类:
其他好文 时间:
2015-02-23 09:40:33
阅读次数:
167
Problem:
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.
Solution:
multiply...
分类:
其他好文 时间:
2015-02-22 14:38:15
阅读次数:
101
Power Strings
Time Limit: 3000MS
Memory Limit: 65536K
Total Submissions: 34601
Accepted: 14319
Description
Given two strings a and b we define a*b to be their conca...
分类:
其他好文 时间:
2015-02-22 11:07:27
阅读次数:
126