# 【leetcode】Construct Binary Tree from Inorder and Postorder Traversal

Question： Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.Anwser 1 ：   /** * Definition for binary tree * st...

# 【leetcode】Construct Binary Tree from Preorder and Inorder Traversal

Question：  Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.Anwser 1 ：      /** * Definition for binary tree * s...

# 【leetcode】Binary Tree Inorder Traversal

Question ： Given a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [1,3,2].Note: Recursive solution is trivia...

# 【leetcode】Flatten Binary Tree to Linked List

Question ： Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6 The flattened tree should look like: 1 \...

# 【leetcode】Binary Tree Level Order Traversal II

Question ： Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For example:Given binary tree {3,9,20,#,#,15...

# 【leetcode】Balanced Binary Tree

Question ： 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 of the two subtrees of every node neve...

# 【leetcode】Minimum Depth of Binary Tree

Question ： 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 leaf node.Anwser 1 ：   /** * Definition...

# 【leetcode】Generate Parentheses

Question ：  Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:"((()))", "(()())", "(())()", "()(())", "...

# 【leetcode】Longest Valid Parentheses

Question：Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the longest valid parentheses substring is "()",...

# 【leetcode】Valid Parentheses

Question ：  Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{}" are al...

# 【leetcode】Binary Tree Maximum Path Sum

Question ：  Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 / \ 2 3 Return 6.Anwser 1 ：...

# 【leetcode】Letter Combinations of a Phone Number

Question ： Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given below.Input:Digit s...

# 【leetcode】Longest Consecutive Sequence

Question ：  Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2],The longest consecutive elements sequence is [1,...

# 【leetcode】Valid Number

Question ： Validate if a given string is numeric.Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => trueNote: It is intended for the problem statement to be ambiguous. You s...

Question ： Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that:Only one letter can be changed at a timeEach intermediate word m...

Question ：Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that:Only one letter can be changed at a timeEach intermediate...

# 【leetcode】Best Time to Buy and Sell Stock III

Question ： Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete at most two transactions.Note:You may...

# 【leetcode】Best Time to Buy and Sell Stock II

Quesion ： Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complete as many transactions as you like (ie,...

# 【leetcode】Best Time to Buy and Sell Stock

Question ：    Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (ie, buy one and sell one share of t...

86条 共5页1 2 3 4 5 ... 下一页 尾页
个人资料
• 访问：11690477次
• 积分：88682
• 等级：
• 排名：第15名
• 原创：708篇
• 转载：169篇
• 译文：16篇
• 评论：3047条
学习经历
中科院、百度、创新工场、小米、阿里巴巴、米扑科技

期货从业资格证（2017.03）
基金从业资格证（2016.11）
证券投资顾问证（2016.9）
证券从业资格证（2016.6）
系统架构设计师（2013）
软件设计师（2008）
CSDN创业专访

程序员创业邦
QQ群： 239292073
青春，每一个有梦想的人

资深产品经理人
QQ群： 338142405
思与行，人人都是产品经理

爱脚本，爱技术
QQ群： 320296250
（已满）
python、ruby、php、go、shell

程序人生的平凡生活
QQ群： 282297696
（已满）
汇聚百度、小米、微软、腾讯、
创新工场、阿里巴巴、日本雅虎
米扑代理
个人博客
博客专栏
 Clojure 学习总结 文章：18篇 阅读：164312
 Python 学习入门 文章：52篇 阅读：686262
 设计模式 文章：2篇 阅读：45533
 Android开发的点点滴滴 文章：32篇 阅读：2074388
博客公告
本博客内容，由本人精心整理
欢迎交流，欢迎转载，大家转载注明出处，禁止用于商业目的。

文章分类