Fork me on GitHub
上一页 1 2 3 4 5 6 7 8 ··· 22 下一页
摘要: 题目:Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Remo... 阅读全文
posted @ 2015-09-09 13:50 __Neo 阅读(303) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum... 阅读全文
posted @ 2015-09-08 15:29 __Neo 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the nearest... 阅读全文
posted @ 2015-09-08 15:09 __Neo 阅读(230) 评论(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 de... 阅读全文
posted @ 2015-09-08 14:43 __Neo 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For ... 阅读全文
posted @ 2015-09-07 20:07 __Neo 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{3,... 阅读全文
posted @ 2015-09-06 21:03 __Neo 阅读(320) 评论(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 @ 2015-09-06 19:28 __Neo 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 题目:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two... 阅读全文
posted @ 2015-09-05 14:39 __Neo 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 题目:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping... 阅读全文
posted @ 2015-09-02 15:24 __Neo 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 题目:Given an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].Note:Could you optimize your algorithm to use onl... 阅读全文
posted @ 2015-09-02 14:45 __Neo 阅读(132) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 22 下一页