上一页 1 ··· 4 5 6 7 8 9 10 11 下一页
摘要: Best Time to Buy and Sell Stock IIISay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the... 阅读全文
posted @ 2015-09-04 17:15 Sean_le 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Best Time to Buy and Sell StockSay you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to compl... 阅读全文
posted @ 2015-09-04 12:27 Sean_le 阅读(164) 评论(0) 推荐(0) 编辑
摘要: Best Time to Buy and Sell Stock IISay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the ... 阅读全文
posted @ 2015-09-04 12:17 Sean_le 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Delete Node in a Linked ListWrite a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the l... 阅读全文
posted @ 2015-09-04 11:53 Sean_le 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Lowest Common Ancestor of a Binary Search TreeGiven a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.Ac... 阅读全文
posted @ 2015-08-29 17:14 Sean_le 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Invert Binary TreeInvert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1我觉得返回void更好一些,就地翻转。还是... 阅读全文
posted @ 2015-08-29 16:19 Sean_le 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Same TreeGiven two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally ide... 阅读全文
posted @ 2015-08-29 15:49 Sean_le 阅读(230) 评论(0) 推荐(0) 编辑
摘要: Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root ... 阅读全文
posted @ 2015-08-29 15:24 Sean_le 阅读(88) 评论(0) 推荐(0) 编辑
摘要: Contains Duplicate IIIGiven an array of integers, find out whether there are two distinct indicesiandjin the array such that the difference betweennum... 阅读全文
posted @ 2015-08-28 23:08 Sean_le 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Ugly Number IIWrite a program to find then-th ugly number.Ugly numbers are positive numbers whose prime factors only include2, 3, 5. For example,1, 2,... 阅读全文
posted @ 2015-08-28 18:35 Sean_le 阅读(142) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页