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
1、删除/etc/grub.conf文件中行首的空白符seds@^[[:space:]]*@@‘/etc/grub.conf2、替换/etc/inittab文件中"id:3:initdefault:"一行中的数字为53、删除/etc/inittab文件中的空白行sed/^$/d/etc/inittab4、删除/etc/inittab文件中开头的#号sed‘s/^#*//g‘/etc/inittab5、删除某文..
分类:
其他好文 时间:
2015-04-14 23:28:16
阅读次数:
298
problem:
Given two sorted integer arrays A and B, merge B into A as one sorted array.
Note:
You may assume that A has enough space (size that is greater or equal to m + n) to hold addit...
分类:
其他好文 时间:
2015-04-14 21:40:11
阅读次数:
138
题目链接:Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake.
Recover the tree without changing its structure.
Note:
A solution using O(n) space is pretty stra...
分类:
其他好文 时间:
2015-04-14 21:39:52
阅读次数:
189
Space AntTime Limit:1000MSMemory Limit:10000KTotal Submissions:3316Accepted:2118DescriptionThe most exciting space discovery occurred at the end of th...
分类:
其他好文 时间:
2015-04-14 21:28:34
阅读次数:
671
在开发一个项目的过程中,因为引入的jar包较多。在Eclipse启动tomcat后经常内存溢出OutOfMemoryError:PermGenspace。现将在Eclipse中修改运行内存大小的流程整理如下:Run->RunConfigurations-Xms256m-Xmx512m-XX:MaxNewSize=256m-XX:MaxPermSize=256m
分类:
系统相关 时间:
2015-04-14 20:15:49
阅读次数:
178