上一页 1 2 3 4 5 6 7 8 ··· 16 下一页

Leetcode:Minimum Depth of Binary Tree

摘要: 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 le... 阅读全文
posted @ 2015-01-02 15:10 Ryan-Xing 阅读(118) 评论(0) 推荐(0) 编辑

Leetcode:Flatten Binary Tree to Linked List

摘要: Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t... 阅读全文
posted @ 2015-01-02 14:31 Ryan-Xing 阅读(140) 评论(0) 推荐(0) 编辑

Leetcode:Convert Sorted Array to Binary Search Tree

摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST.分析:对于BST,左右子树的高度差小于等于1,则在由sorted array构建BST时把数组中间元素作为... 阅读全文
posted @ 2014-12-31 15:03 Ryan-Xing 阅读(108) 评论(0) 推荐(0) 编辑

Leetcode:Binary Tree Level Order Traversal II

摘要: 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 exa... 阅读全文
posted @ 2014-12-29 12:53 Ryan-Xing 阅读(150) 评论(0) 推荐(0) 编辑

Leetcode:Binary Tree Level Order Traversal

摘要: 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,9,2... 阅读全文
posted @ 2014-12-29 12:36 Ryan-Xing 阅读(124) 评论(0) 推荐(0) 编辑

Leetcode:Balanced Binary Tree

摘要: 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 depth... 阅读全文
posted @ 2014-12-29 12:24 Ryan-Xing 阅读(108) 评论(0) 推荐(0) 编辑

Binary Tree Maximum Path Sum

摘要: class Solution {public: int maxPathSum(TreeNode *root) { if(root == NULL) return 0; int max_sum = INT_MIN; unordered_map node_... 阅读全文
posted @ 2014-12-19 21:17 Ryan-Xing 阅读(109) 评论(0) 推荐(0) 编辑

Quant面试准备5本书

摘要: Heard on The Street: Quantitative Questions from Wall Street Job Interviews- Timothy Falcon CrackFrequently Asked Questions in Quantitative Finance- P... 阅读全文
posted @ 2014-12-19 21:15 Ryan-Xing 阅读(1844) 评论(0) 推荐(1) 编辑

Leetcode: Evaluate Reverse Polish Notation

摘要: Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express... 阅读全文
posted @ 2014-12-15 21:30 Ryan-Xing 阅读(119) 评论(0) 推荐(0) 编辑

Leetcode: Largest Rectangle in Histogram

摘要: Givennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histog... 阅读全文
posted @ 2014-12-12 20:34 Ryan-Xing 阅读(133) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 16 下一页