/*put all vaild new array from the 0 to new length*/public class Solution { public int removeDuplicates(int[] A) { if(A.length < 2) ...
分类:
其他好文 时间:
2014-10-07 06:55:53
阅读次数:
120
Given preorder and inorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
/**
* Definition for binary tree
* struct TreeNode {
...
分类:
其他好文 时间:
2014-10-06 14:46:30
阅读次数:
202
Given inorder and postorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
/**
* Definition for binary tree
* struct TreeNode {...
分类:
其他好文 时间:
2014-10-06 14:45:50
阅读次数:
178
很多人本来随手安装的一个软件, 相信也信任得过它 , 这下让我测试对它失望了,没想到鲁大师这个测温功能实在太搓了!!
白白浪费了我一晚上, 搞来了硅胶 ,弄了几遍 , 还是一样, 还以为买了水货 !!就差点换风扇了 . 后来才发现是鲁某的问题 !
不多说 直接上专业软件 AIDA64 和 Real Temp 与 鲁大屎 的真相对比图 ! 鲁某已经上90度报警 , 而身边两个软件还是50...
分类:
其他好文 时间:
2014-10-06 11:08:40
阅读次数:
527
class Solution {
public:
int removeDuplicates(int A[], int n) {
int duplicate = 0;
int i = 0;
for(i = 0; i < n - 1; i++){
if(A[i] == A[i + 1]){
dupli...
分类:
其他好文 时间:
2014-10-05 22:23:09
阅读次数:
183
给定一个排好序的链表,删除所有重复的节点,使每一个节点都只出现一次...
分类:
其他好文 时间:
2014-10-05 21:17:09
阅读次数:
212
Remove Duplicates from Sorted List
Given a sorted linked list, delete all duplicates such that each element appear only once.
For example,
Given 1->1->2, return 1->2.
Given 1->1->2->3->3, return 1->2->3.
很简单,先判断第一个位置否为空,不为空的话再判断下 个位置是否为空,如果都为空那么就不用操作了。
如果两...
分类:
其他好文 时间:
2014-10-05 20:16:08
阅读次数:
202
HUP(1)挂起,通常因终端掉线或用户退出引发INT(2)中断,通常因CTRL+C组合引发QUIT(3)退出,通常因CTRL+/组合引发ABRT(6)中止,通常因某些严重的错误而引发ALRM(14)报警,通常用来处理超时TERM(15)终止,通常在系统关机时发送TSTP(20)停止进程的运行,但该信号可..
分类:
其他好文 时间:
2014-10-05 04:37:38
阅读次数:
174
国内做运维的人,很多觉得开发很神秘很难国内做开发的人,很多觉得运维就是搬机器收报警,脏活累活7*24随时等待召唤相互都把对方理解错了。以我多年的经验来看,国内的运维的确存在很多问题。比如,开发人员被宠的太厉害,运维人员话语权少。由于人力便宜,在自动化运维方面重视不够。等等。 这样造成一个印象,运维围...
分类:
其他好文 时间:
2014-10-04 03:40:45
阅读次数:
189
Given a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new length.Do not allocate extra space for a...
分类:
其他好文 时间:
2014-10-01 19:08:51
阅读次数:
163