上一页 1 ··· 7 8 9 10 11 12 13 14 15 下一页
摘要: 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... 阅读全文
posted @ 2014-10-06 10:51 birdhack 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 1.POST不是幂等的。 GET只是得到一些东西,不会对服务器进行修改。它能执行多次。 POST提交的数据可能用于不可逆转的事物。2. 想让一个servlet同时支持GET POST。 开发人员通常会把逻辑放在doGET()中。public void doPost(...) throws... 阅读全文
posted @ 2014-10-04 12:54 birdhack 阅读(183) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ... 阅读全文
posted @ 2014-10-02 08:24 birdhack 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your algor... 阅读全文
posted @ 2014-09-29 22:08 birdhack 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2014-09-26 14:05 birdhack 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 1 /** 2 * Definition for binary tree 3 * public cl... 阅读全文
posted @ 2014-09-26 11:28 birdhack 阅读(136) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth... 阅读全文
posted @ 2014-09-26 10:42 birdhack 阅读(109) 评论(0) 推荐(0) 编辑
摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 1 /** 2 ... 阅读全文
posted @ 2014-09-25 11:11 birdhack 阅读(146) 评论(0) 推荐(0) 编辑
摘要: Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat... 阅读全文
posted @ 2014-09-25 10:41 birdhack 阅读(89) 评论(0) 推荐(0) 编辑
摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[−2,1,−3,4,−1,2,1,... 阅读全文
posted @ 2014-09-25 10:01 birdhack 阅读(113) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 下一页