码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
Codeforces Round #280 (Div. 2) d
/** ?*?@brief?Codeforces?Round?#280?(Div.?2)?d ?*?@file?d.cpp ?*?@author?mianma ?*?@created?2014/12/02?14:38 ?*?@edited??2014/12/02?14:38 ?*?@type?math?brute?binary_sear...
分类:其他好文   时间:2014-12-04 14:08:32    阅读次数:193
Lowest Common Ancestor of Two Nodes in a Binary Tree
Reference:http://blog.csdn.net/v_july_v/article/details/18312089 http://leetcode.com/2011/07/lowest-common-ancestor-of-a-binary-tree-part-ii.html(1) ....
分类:其他好文   时间:2014-12-04 08:48:25    阅读次数:200
LeetCode Gray Code
The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the code, print the sequence of...
分类:其他好文   时间:2014-12-04 08:47:00    阅读次数:168
算法与数据结构基础4:C++二叉树实现及遍历方法大全
binary search tree,中文翻译为二叉搜索树、二叉查找树或者二叉排序树。简称为BST。 本文集齐了二叉树的五大遍历算法:先序遍历、中序遍历、后序遍历、深度优先遍历和广度优先遍历(同层遍历也就是深度优先遍历)。 // BSTree.h #include #include #include #include using namespace std; // bin...
分类:编程语言   时间:2014-12-04 01:02:39    阅读次数:303
LeetCode: Binary Tree Inorder Traversal 解题报告
Binary Tree Inorder TraversalGiven a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3...
分类:其他好文   时间:2014-12-04 00:52:08    阅读次数:191
leetcode Binary Tree Maximum Path Sum
给定一颗数,然后任意的起点或者终点,找到最大的路径和。例如:Given the below binary tree, 1 / \ 2 3Return6.一看到是标hard的题目就觉得要吃力才能搞出来。果然,经过不懈奋斗,成功从Time Limited到AC。我看到这...
分类:其他好文   时间:2014-12-04 00:42:49    阅读次数:245
LeetCode: Binary Tree Preorder Traversal 解题报告
Binary Tree Preorder Traversal Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 ...
分类:其他好文   时间:2014-12-03 23:14:20    阅读次数:163
LeetCode: isSameTree1 解题报告
isSameTree1Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally i...
分类:其他好文   时间:2014-12-03 23:11:24    阅读次数:367
[Leetcode] Binary Tree Maximum Path Sum
这是LeetCode上的一道题目,需要求二叉树中两点路径的最大和。原题是https://oj.leetcode.com/problems/binary-tree-maximum-path-sum/Given a binary tree, find the maximum path sum.The p...
分类:其他好文   时间:2014-12-03 23:05:58    阅读次数:226
LeetCode: Symmetric Tree 解题报告
Symmetric TreeGiven a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric...
分类:其他好文   时间:2014-12-03 23:00:53    阅读次数:290
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!