import java.util.Arrays; import java.util.Stack; // 链式存储的二叉树 public class BSTree { private TreeNode root = null; public TreeNode getRoot() { return ro... ...
分类:
编程语言 时间:
2017-04-13 22:57:32
阅读次数:
312
题目: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted i ...
分类:
编程语言 时间:
2017-04-12 11:10:28
阅读次数:
149
题目:在一个长度为n的数组里的所有数字都在0到n-1的范围内。 数组中某些数字是重复的,但不知道有几个数字是重复的。也不知道每个数字重复几次。请找出数组中任意一个重复的数字。 例如,如果输入长度为7的数组{2,3,1,0,2,5,3},那么对应的输出是重复的数字2或者3。 思路:基于map的思路。。 ...
分类:
编程语言 时间:
2017-04-11 09:56:53
阅读次数:
248
题目:在一个排序的链表中,存在重复的结点,请删除该链表中重复的结点,重复的结点不保留,返回链表头指针。 例如,链表1->2->3->3->4->4->5 处理后为 1->2->5 思路:难点在于指针的控制。。。。 ...
分类:
其他好文 时间:
2017-04-11 09:53:37
阅读次数:
178
选择Activation code,将下面的注册码复制粘贴进去即可激活: BIG3CLIK6F-eyJsaWNlbnNlSWQiOiJCSUczQ0xJSzZGIiwibGljZW5zZWVOYW1l IjoibGFuIHl1IiwiYXNzaWduZWVOYW1lIjoiIiwiYXNzaWduZ ...
分类:
其他好文 时间:
2017-04-10 10:56:12
阅读次数:
9041
Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear twi ...
分类:
其他好文 时间:
2017-04-04 10:41:15
阅读次数:
200
In order to be irreplaceable one must always be different. 若想无可替代,必须与众不同。 If all your skills or personalities can be easily duplicated, or, said in an ...
分类:
其他好文 时间:
2017-04-04 09:19:12
阅读次数:
133
Cookie,指某些网站为了辨别用户身份、进行session跟踪而储存在用户本地终端上的数据(通常经过加密) 比如说有些网站需要登录后才能访问某个页面,在登录之前,你想抓取某个页面内容是不允许的。那么我们可以利用Urllib2库保存我们登录的Cookie,然后再抓取其他页面就达到目的了。 在此之前呢 ...
分类:
编程语言 时间:
2017-04-01 18:21:16
阅读次数:
237
题目: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). F ...
分类:
其他好文 时间:
2017-03-30 17:43:46
阅读次数:
177