码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
Unique Binary Search Trees
/* 卡特兰数,只记得递推公式, h(n) = h(n-1)*(4*n-2)/(n+1), h(n) = C(2*n,n)/(n+1), h(n) = C(2*n,n) - C(2*n,n+1);*/class Solution {public: int C(int n...
分类:其他好文   时间:2015-03-14 16:39:15    阅读次数:123
Binary Tree Level Order Traversal
我竟然先做的前一题,无语了/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : ...
分类:其他好文   时间:2015-03-14 15:14:44    阅读次数:78
leetcode------Binary Tree Zigzag Level Order Traversal
标题:Binary Tree Zigzag Level Order Traversal通过率:26.5%难度:中等Given a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from le...
分类:其他好文   时间:2015-03-14 15:05:47    阅读次数:151
Construct Binary Tree from Preorder and Inorder Traversal
Construct Binary Tree from Preorder and Inorder Traversal问题:Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may ass...
分类:其他好文   时间:2015-03-14 13:43:43    阅读次数:121
Linux i2c 读写程序
/* This software uses a BSD license.Copyright (c) 2010, Sean Cross / chumby industriesAll rights reserved. Redistribution and use in source and binary...
分类:系统相关   时间:2015-03-14 12:18:01    阅读次数:1157
Leetcode: Reverse Bits
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return...
分类:其他好文   时间:2015-03-14 07:24:14    阅读次数:139
LeetCode 190 Reverse Bits
Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as 001110010...
分类:其他好文   时间:2015-03-14 06:13:47    阅读次数:147
OpenCV2.4.10 Mac Configuration
Download OpenCV 2.4.10Download CMake 2.8Open CMake and choose the source code directory and build binary directoryThen click "Configure", and "Generat...
分类:系统相关   时间:2015-03-14 06:12:57    阅读次数:233
hdu 1392(凸包)
传送门:Surround the Trees题意:求凸包的周长。分析:凸包模板题,先按极角排好序后,然后根据叉积正负确定凸包。#include #include #include #include #include using namespace std;const double eps = 1e-...
分类:其他好文   时间:2015-03-14 00:58:52    阅读次数:126
Construct Binary Tree from Inorder and Postorder Traversal
Construct Binary Tree from Inorder and Postorder Traversal问题: Given inorder and postorder traversal of a tree, construct the binary tree.思路: dfs我的代码.....
分类:其他好文   时间:2015-03-13 22:11:25    阅读次数:198
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!