摘要: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol... 阅读全文
posted @ 2014-07-07 14:21 Hicandyman 阅读(157) 评论(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-07-07 13:43 Hicandyman 阅读(86) 评论(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-07-07 13:16 Hicandyman 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Funnel Analysis for Online businessWhat is happening to all my traffic acquired through email marketing and PPC campaigns? Why are they not bringing i... 阅读全文
posted @ 2014-07-07 06:41 Hicandyman 阅读(789) 评论(0) 推荐(0) 编辑
摘要: Clone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes are labeled uniq... 阅读全文
posted @ 2014-07-06 13:29 Hicandyman 阅读(118) 评论(0) 推荐(0) 编辑
摘要: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ... 阅读全文
posted @ 2014-07-06 12:23 Hicandyman 阅读(379) 评论(0) 推荐(0) 编辑
摘要: 二叉树前序遍历,中序遍历,后序遍历。 1 void preOrder_N(BTNode* root) 2 { 3 stack s; 4 while(root!=NULL||!s.empty()) 5 { 6 if(root!=NULL) 7 {... 阅读全文
posted @ 2014-07-06 09:39 Hicandyman 阅读(126) 评论(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-07-06 05:48 Hicandyman 阅读(233) 评论(0) 推荐(0) 编辑
摘要: There areNgas stations along a circular route, where the amount of gas at stationiisgas[i].You have a car with an unlimited gas tank and it costscost[... 阅读全文
posted @ 2014-07-06 04:51 Hicandyman 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity... 阅读全文
posted @ 2014-07-05 15:14 Hicandyman 阅读(99) 评论(0) 推荐(0) 编辑