码迷,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 6The flattened t...
分类:其他好文   时间:2014-07-19 00:24:36    阅读次数:170
【leetcode刷题笔记】Sum Root to Leaf Numbers
Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which rep...
分类:其他好文   时间:2014-07-18 20:09:38    阅读次数:433
LeetCode "Search Insert Position"
A simple 1D searching problem. Binary search of course.But.. STL has already done it for you:class Solution {public: int searchInsert(int A[], int ...
分类:其他好文   时间:2014-07-18 18:35:41    阅读次数:205
【leetcode刷题笔记】Path Sum
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo...
分类:其他好文   时间:2014-07-18 18:28:44    阅读次数:231
递归实现二进制转十进制
题目:应用递归,将输入的二进制数转换为十进制。#include #include void binary_to_decimal(char *s, long dec){ if( *s == '\0' ) printf("Decimal: %ld\n",dec); else ...
分类:其他好文   时间:2014-07-18 18:23:50    阅读次数:217
LeetCode "Unique Binary Search Trees"
Another recursion-style problem.1. Each count of sub-solution with a certain root should contribute to final count2. With a certain root, the num of l...
分类:其他好文   时间:2014-07-18 18:18:01    阅读次数:187
HDUJ 1392 Surround the Trees 凸包
Surround the Trees Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7203    Accepted Submission(s): 2752 Problem Description There are a...
分类:其他好文   时间:2014-07-18 18:03:10    阅读次数:195
Linux操作系统文件目录说明
/bin----bin是Binary的缩写。这个目录存放着最经常使用的命令。/boot----这里存放的是启动Linux时使用的一些核心文件,包括一些链接文件以及镜像文件。/dev----dev是Device(设备)的缩写。该目录下存放的是Linux的外部设备,在Linux中访问设备的方式和访问文件的方式是相同的。/..
分类:系统相关   时间:2014-07-18 13:09:31    阅读次数:254
Uva 679 Dropping Balls
Dropping BallsA number of K balls are dropped one by one from the root of a fully binary tree structure FBT. Each time the ball being dropped first v....
分类:其他好文   时间:2014-07-18 12:14:24    阅读次数:202
LeetCode :: Sum Root to Leaf Numbers [tree、dfs]
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 which represents the number 123. Find the to...
分类:其他好文   时间:2014-07-18 11:13:57    阅读次数:204
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!