码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
LeetCode: Construct Binary Tree from Inorder and Postorder Traversal 解题报告
Construct Binary Tree from Inorder and Postorder TraversalGiven inorder and postorder traversal of a tree, construct the binary tree.Note:You may assu...
分类:其他好文   时间:2015-01-03 17:18:44    阅读次数:136
leetcode 156: Binary Tree Upside Down
Binary Tree Upside Down Total Accepted: 813 Total Submissions: 2515 Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent ...
分类:其他好文   时间:2015-01-03 15:58:52    阅读次数:134
[LeetCode]173.Binary Search Tree Iterator
【题目】 Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the next smallest number in the BST. No...
分类:其他好文   时间:2015-01-03 12:00:06    阅读次数:161
【leetcode】Binary Tree Maximum Path Sum
Binary Tree Maximum Path SumGiven a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the be...
分类:其他好文   时间:2015-01-03 11:52:22    阅读次数:137
【leetcode】Path Sum II
Path Sum IIGiven a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tr...
分类:其他好文   时间:2015-01-03 11:50:53    阅读次数:110
Binary Search Tree Iterator
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Callingnext()will return the next...
分类:其他好文   时间:2015-01-03 11:50:18    阅读次数:135
Majority Element(ARRAY-BINARY SEARCH)
QUESTIONGiven an array of size n, find the majority element. The majority element is the element that appears more than ? n/2 ? times.You may assume t...
分类:其他好文   时间:2015-01-03 11:48:00    阅读次数:146
Twitter OA prepare: Flipping a bit
You are given a binary array with N elements: d[0], d[1], ... d[N - 1]. You can perform AT MOST one move on the array: choose any two integers [L, R],...
分类:其他好文   时间:2015-01-03 07:05:32    阅读次数:298
LeetCode: Construct Binary Tree from Preorder and Inorder Traversal 解题报告
Construct Binary Tree from Preorder and Inorder TraversalGiven preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume...
分类:其他好文   时间:2015-01-03 00:53:53    阅读次数:235
数据结构——二叉树(Binary Trees)
非线性数据结构树的密度=结点数/高度二叉树类 1 #pragma once 2 3 class stnode 4 { 5 public: 6 int nodeValue; // node data 7 8 stnode *left, *right, *...
分类:其他好文   时间:2015-01-02 22:18:52    阅读次数:392
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!