上一页 1 2 3 4 5 6 7 ··· 11 下一页
摘要: Remove Duplicates from Sorted ArrayGiven a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new lengt... 阅读全文
posted @ 2015-09-16 10:48 Sean_le 阅读(92) 评论(0) 推荐(0) 编辑
摘要: CombinationsGiven two integersnandk, return all possible combinations ofknumbers out of 1 ...n.For example,Ifn= 4 andk= 2, a solution is:[ [2,4], [3... 阅读全文
posted @ 2015-09-16 10:33 Sean_le 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Search in Rotated Sorted Array IIFollow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity... 阅读全文
posted @ 2015-09-15 14:35 Sean_le 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Binary Tree Level Order Traversal IIGiven a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level... 阅读全文
posted @ 2015-09-14 22:52 Sean_le 阅读(108) 评论(0) 推荐(0) 编辑
摘要: Binary Tree Level Order TraversalGiven a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).Fo... 阅读全文
posted @ 2015-09-14 16:42 Sean_le 阅读(117) 评论(0) 推荐(0) 编辑
摘要: H-Index IIFollow upforH-Index: What if thecitationsarray is sorted in ascending order? Could you optimize your algorithm?二分查找,时间复杂度O(logn)。 1 class So... 阅读全文
posted @ 2015-09-14 11:00 Sean_le 阅读(146) 评论(0) 推荐(0) 编辑
摘要: H-IndexGiven an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher's h-index.Acc... 阅读全文
posted @ 2015-09-14 10:19 Sean_le 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Symmetric TreeGiven a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric... 阅读全文
posted @ 2015-09-14 00:11 Sean_le 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Remove ElementGiven 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. ... 阅读全文
posted @ 2015-09-13 23:40 Sean_le 阅读(98) 评论(0) 推荐(0) 编辑
摘要: Search a 2D Matrix IIWrite an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each ... 阅读全文
posted @ 2015-09-13 20:45 Sean_le 阅读(144) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 11 下一页