码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
Java for LeetCode 094 Binary Tree Inorder Traversal
解题思路:中序遍历,左子树-根节点-右子树JAVA实现如下: public List inorderTraversal(TreeNode root) { List list = new ArrayList(); if(root==null) r...
分类:编程语言   时间:2015-05-20 23:56:04    阅读次数:174
PAT Tree Traversals Again
Tree Traversals AgainAn inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example, suppose that when a 6-node ...
分类:其他好文   时间:2015-05-20 21:51:18    阅读次数:110
2 Sum in Binary Search Tree
Given a BST, find 2 nodes in it which sum to a given targethint:Inorder traversal + BST + 2 SUM* Time : O(N)* Space: O(lgN) 1 class TreeNode0 { 2 ...
分类:其他好文   时间:2015-05-20 13:03:34    阅读次数:188
arm交叉编译器gnueabi、none-eabi、arm-eabi、gnueabihf、gnueabi区别
命名规则交叉编译工具链的命名规则为:arch [-vendor] [-os] [-(gnu)eabi]arch – 体系架构,如ARM,MIPSvendor – 工具链提供商os – 目标操作系统eabi – 嵌入式应用二进制接口(Embedded Application Binary Interf...
分类:其他好文   时间:2015-05-20 12:47:23    阅读次数:106
Java for LeetCode 087 Scramble String
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representatio...
分类:编程语言   时间:2015-05-20 01:57:32    阅读次数:192
Java for LeetCode 089 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 numb...
分类:编程语言   时间:2015-05-20 01:56:53    阅读次数:188
LeeCode 判断两个二叉树是否相等
题目: Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value. C代码...
分类:其他好文   时间:2015-05-19 22:47:09    阅读次数:147
win7 64位系统使用vs2010编译OSG3.2.1
首先我想说的是,osg是有二进制安装包的:http://openscenegraph.alphapixel.com/osg/downloads/free-openscenegraph-binary-downloads(也不叫二进制安装包,就是别人预先编译好的)。我认为,如果只是简单的用下osg,.....
分类:Windows程序   时间:2015-05-19 22:20:18    阅读次数:468
Java for LeetCode 085 Maximal Rectangle
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.解题思路:求01矩阵中,全是1的子矩阵的最大面积。把矩阵按照每一行...
分类:编程语言   时间:2015-05-19 20:39:59    阅读次数:280
[LeetCode-JAVA] Gray Code
题目:The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total num...
分类:编程语言   时间:2015-05-19 12:08:38    阅读次数:230
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!