码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
LeetCode --- 105. Construct Binary Tree from Preorder and Inorder Traversal
题目链接:Construct Binary Tree from Preorder and Inorder Traversal Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the ...
分类:其他好文   时间:2015-04-16 10:24:42    阅读次数:137
LeetCode --- 101. Symmetric Tree
题目链接:Symmetric Tree 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 / \ 2 2 / \ / \ 3 ...
分类:其他好文   时间:2015-04-16 09:06:02    阅读次数:147
LeetCode --- 102. Binary Tree Level Order Traversal
题目链接:Binary Tree Level Order Traversal Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example: Given binary tree {3,9,20,#...
分类:其他好文   时间:2015-04-16 09:03:12    阅读次数:160
Populating Next Right Pointers in Each Node *
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointe...
分类:其他好文   时间:2015-04-15 23:02:52    阅读次数:114
[LeetCode 199] Binary Tree Right Side View
题目链接:binary-tree-right-side-view import java.util.ArrayList; import java.util.List; /** * Given a binary tree, imagine yourself standing on the right side of it, return the values of the n...
分类:其他好文   时间:2015-04-15 19:39:40    阅读次数:145
Matlab中bsxfun和unique函数解析
一.问题来源 来自于一份LSH代码,记录下来。二.函数解析2.1 bsxfun bsxfun是一个matlab自版本R2007a来就提供的一个函数,作用是”applies an element-by-element binary operation to arrays a and b, with.....
分类:其他好文   时间:2015-04-15 19:11:17    阅读次数:157
【leetcode】Populating Next Right Pointers in Each Node I & II(middle)
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointe...
分类:其他好文   时间:2015-04-15 18:28:59    阅读次数:137
LeetCode --- 96. Unique Binary Search Trees
题目链接:Unique Binary Search Trees Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For example, Given n = 3, there are a total of 5 unique BST's. 1 ...
分类:其他好文   时间:2015-04-14 21:41:56    阅读次数:139
LeetCode --- 98. Validate Binary Search Tree
题目链接:Validate Binary Search Tree Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only nodes with ...
分类:其他好文   时间:2015-04-14 21:41:20    阅读次数:118
LeetCode --- 99. Recover Binary Search Tree
题目链接:Recover Binary Search Tree Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Note: A solution using O(n) space is pretty stra...
分类:其他好文   时间:2015-04-14 21:39:52    阅读次数:189
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!