12 2014 档案
Leetcode 3Sum
摘要:Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen... 阅读全文
posted @ 2014-12-25 15:35 Chris兔的小佳佳 阅读(99) 评论(0) 推荐(0)
Leetcode Container With Most Water
摘要:Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ... 阅读全文
posted @ 2014-12-23 00:03 Chris兔的小佳佳 阅读(111) 评论(0) 推荐(0)
Leetcode Palindrome Number
摘要:Determine whether an integer is a palindrome. Do this without extra space.对于这道题不能用额外的空间,即不能用一个数组来保存各个位数,因此对于这种问题可以采用判断两头数字的方法 1 package Palindrome.Num... 阅读全文
posted @ 2014-12-22 21:26 Chris兔的小佳佳 阅读(110) 评论(0) 推荐(0)
对线程中断,join,yield的理解
摘要:一个线程在未正常结束之前, 被强制终止是很危险的事情. 因为它可能带来完全预料不到的严重后果. 所以你看到Thread.suspend, Thread.stop等方法都被Deprecated了那么不能直接把一个线程搞挂掉, 但有时候又有必要让一个线程死掉, 或者让它结束某种等待的状态 该怎么办呢? ... 阅读全文
posted @ 2014-12-04 22:14 Chris兔的小佳佳 阅读(1271) 评论(0) 推荐(0)