Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.For example:Input:["tea","and","ate",...
分类:
其他好文 时间:
2014-10-06 12:02:00
阅读次数:
167
当在tablelayout中显示图片时,设置imageView为固定大小时,会出现divide by zero 错误将LayoutParams 改为 TableRow.LayoutParams即可TableRow.LayoutParams params = new TableRow.LayoutPa...
分类:
移动开发 时间:
2014-10-02 11:09:22
阅读次数:
210
Divide two integers without using multiplication, division and mod operator.方法一:暴力破解,不断用被除数减去除数,直至出现负数停止,铁定超时。方法二:对方法一的改进,每次寻找 满足2k-1 * 除数 0 && diviso...
分类:
其他好文 时间:
2014-10-02 01:55:51
阅读次数:
271
brief : the quick sort can divide into two steps, the first step is partition, the second step is conquer the subset.i) as the first step, array A[lef...
分类:
其他好文 时间:
2014-10-01 01:21:50
阅读次数:
209
现在Jetty的版本已经到9了,也早已经在Eclipse的门下了。所以有很多groupId,比如:org.eclipse.jetty、org.mortbay.jetty.这些都可以用的哦。我在使用MyEclipse结合maven操作jetty作为开发的服务器,这开开发比较方便。当我运行命令:jetty:run出现:[ERROR]Nopluginfoundforp..
分类:
其他好文 时间:
2014-10-01 00:48:11
阅读次数:
433
题目:给你一个等比数列的首项和公比的倒数,如果尾项是1输出这个数列,否则输出Boring!。
分析:数学题。按照题目要求数列是递减的,所以公比的倒数一定要大于1,即m > 1。
然后在附加一个条件n > m判断位数是否为1即可。
说明:这种卡题意的题目好纠结╮(╯▽╰)╭。
#include
#include
#include
using namespac...
分类:
其他好文 时间:
2014-09-30 17:54:29
阅读次数:
578
_CodeSignature/CodeResources ??
archived-expanded-entitlements.xcent
Xcode6 新生成的。
keychain-access-groups:
Keychain access groups allows an application to use the system keychain to sto...
分类:
其他好文 时间:
2014-09-30 04:19:12
阅读次数:
455
最终确定是shell环境问题,临时改为/bin/bash即可查看.1.问题现象# su - jingyu$ iduid=503(jingyu) gid=507(jingyu) groups=507(jingyu)$ ulimit -aulimit: Command not found.2.临时切换为...
分类:
其他好文 时间:
2014-09-29 00:07:16
阅读次数:
252
Given an array of strings, return all groups of strings that are anagrams.
Note: All inputs will be in lower-case.
public class Solution {
public List anagrams(String[] strs) {
Map map = new Ha...
分类:
其他好文 时间:
2014-09-28 19:10:56
阅读次数:
162
算法是采用分治法(Divide and Conquer)的一个非常典型的应用。首先考虑下如何将将二个有序数列合并。这个非常简单,只要从比较二个数列的第一个数,谁小就先取谁,取了后就在对应数列中删除这个数。然后再进行比较,如果有数列为空,那直接将另一个数列的数据依次取出即可。 1 //将有序数组a[]...
分类:
其他好文 时间:
2014-09-28 14:31:12
阅读次数:
204