码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
LeetCode-Flatten Binary Tree to Linked List
Given a binary tree, flatten it to a linked list in-place. For example, Given 1 / 2 5 / \ 3 4 6 The flattened tree should look like: 1...
分类:其他好文   时间:2015-08-15 16:33:08    阅读次数:140
pat03-树3. Tree Traversals Again (25)
03-树3. Tree Traversals Again (25)时间限制200 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, YueAn inorder binary tree traversal can be implemented in a non...
分类:其他好文   时间:2015-08-15 13:24:55    阅读次数:95
移动开发-腾讯邮箱集成
分享一个最近写的腾讯邮箱集成方法: 1 package services.tencentmail.impl; 2 3 import net.sf.json.JSONObject; 4 import org.apache.commons.codec.binary.Base64; 5 import...
分类:移动开发   时间:2015-08-15 13:16:39    阅读次数:162
上下翻转二叉树
from?https://leetcode.com/problems/binary-tree-upside-down/; 一个列子:在翻转前 ????1 ???/???2???3 ?/?4???5 翻转后: ???4 ??/??5???2 ????/????3???1 先...
分类:其他好文   时间:2015-08-15 12:10:33    阅读次数:196
[LintCode] Count 1 in Binary
Count how many1in binary representation of a 32-bit integer.ExampleGiven32, return1Given5, return2Given1023, return9ChallengeIf the integer isnbits wi...
分类:其他好文   时间:2015-08-15 10:20:08    阅读次数:142
【LeetCode-面试算法经典-Java实现】【129-Sum Root to Leaf Numbers(所有根到叶子结点组组成的数字相加)】
【129-Sum Root to Leaf Numbers(所有根到叶子结点组组成的数字相加)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题  Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.   An example...
分类:编程语言   时间:2015-08-15 06:44:54    阅读次数:114
[Leetcode] Binary tree travelsal (preorder, inorder, postorder)
一、前序 1 public List preOrder(Node root){ 2 List res = new LinkedList(); 3 Stack stack = new Stack(); 4 stack.push(root); 5 while(root!=...
分类:其他好文   时间:2015-08-15 01:28:01    阅读次数:116
LeetCode-Balanced Binary Tree
Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never diffe...
分类:其他好文   时间:2015-08-14 19:18:52    阅读次数:123
LeetCode-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,#,#,15,7}, 3 / 9 20...
分类:其他好文   时间:2015-08-14 19:11:16    阅读次数:88
BSD介绍
BSD许可证模板* Copyright (c) 1998, Regents of the University of California* All rights reserved.* Redistribution and use in source and binary forms, with o...
分类:其他好文   时间:2015-08-14 18:40:59    阅读次数:158
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!