上一页 1 ··· 46 47 48 49 50 51 52 53 54 ··· 98 下一页
摘要: 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-11-19 20:39 Jessica程序猿 阅读(188) 评论(0) 推荐(0) 编辑
摘要: Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up:Did you use extra space?A s... 阅读全文
posted @ 2014-11-19 19:31 Jessica程序猿 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t... 阅读全文
posted @ 2014-11-19 17:17 Jessica程序猿 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Dynamic ProgrammingGiven a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For exa... 阅读全文
posted @ 2014-11-19 17:00 Jessica程序猿 阅读(271) 评论(0) 推荐(0) 编辑
摘要: Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from l... 阅读全文
posted @ 2014-11-19 16:34 Jessica程序猿 阅读(256) 评论(0) 推荐(0) 编辑
摘要: Given an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, wh... 阅读全文
posted @ 2014-11-19 15:23 Jessica程序猿 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted array A =[1,1,1,2,2,3],Your function should ret... 阅读全文
posted @ 2014-11-19 13:30 Jessica程序猿 阅读(164) 评论(0) 推荐(0) 编辑
摘要: Dynamic ProgrammingFind the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the ... 阅读全文
posted @ 2014-11-19 09:47 Jessica程序猿 阅读(171) 评论(0) 推荐(0) 编辑
摘要: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-... 阅读全文
posted @ 2014-11-18 23:15 Jessica程序猿 阅读(196) 评论(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-11-18 21:28 Jessica程序猿 阅读(165) 评论(0) 推荐(0) 编辑
上一页 1 ··· 46 47 48 49 50 51 52 53 54 ··· 98 下一页