/* 卡特兰数,只记得递推公式, 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
我竟然先做的前一题,无语了/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : ...
分类:
其他好文 时间:
2015-03-14 15:14:44
阅读次数:
78
标题: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问题:Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may ass...
分类:
其他好文 时间:
2015-03-14 13:43:43
阅读次数:
121
/* 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
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
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
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
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
Binary Search Tree Iterator问题:Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Cal...
分类:
其他好文 时间:
2015-03-13 20:32:54
阅读次数:
149