码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
leetcode 226: Invert Binary Tree
题目:Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1Trivia:This problem was inspired byt...
分类:其他好文   时间:2015-09-20 19:04:39    阅读次数:158
【动态规划】leetcode - Maximal Square
称号:Maximal SquareGiven a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For example, given t...
分类:其他好文   时间:2015-09-20 16:06:24    阅读次数:122
LeetCode -- Maximum Depth of Binary Tree
Question:Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the fa...
分类:其他好文   时间:2015-09-20 14:29:30    阅读次数:111
[LeetCode#272] Closest Binary Search Tree Value II
Problem:Given a non-empty binary search tree and a target value, findkvalues in the BST that are closest to the target.Note:Given target value is a fl...
分类:其他好文   时间:2015-09-20 11:48:20    阅读次数:298
LeetCode -- Lowest Common Ancestor of a Binary Search Tree
Question:Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to thedefinition of LCA on Wi...
分类:其他好文   时间:2015-09-20 11:39:08    阅读次数:175
Unique Binary Search Trees 解答
QuestionGivenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BS...
分类:其他好文   时间:2015-09-20 08:05:53    阅读次数:149
[LeetCode][JavaScript]Binary Tree Postorder Traversal
Binary Tree Postorder TraversalGiven a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \...
分类:编程语言   时间:2015-09-19 22:25:13    阅读次数:194
LeetCode -- Binary Tree Right Side View
LeetCode -- Binary Tree Right Side View...
分类:其他好文   时间:2015-09-19 19:45:27    阅读次数:120
LeetCode -- Binary Tree Inorder Traversal
LeetCode -- Binary Tree Inorder Traversal 中序遍历...
分类:其他好文   时间:2015-09-19 16:52:18    阅读次数:153
【剑指Offer】二叉搜索树的后序遍历序列
问题描述:输入一个整数数组,判断该数组是不是某二叉搜索树的后序遍历的结果。如果是则输出Yes,否则输出No。假设输入的数组的任意两个数字都互不相同。背景知识:二叉搜索树(Binary Search Tree),又叫二叉排序树:或者是一棵空树,或者是具有下列性质的二叉树: 若它的左子树不空,则左子树上所有结点的值均小于它的根结点的值; 若它的右子树不空,则右子树上所有结点的值均大于它的根结点的值; 它...
分类:其他好文   时间:2015-09-19 06:14:07    阅读次数:178
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!