码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
Unique Binary Search Trees
问题来源:https://leetcode.com/problems/unique-binary-search-trees//** * * * ClassName UniqueBinarySearchTrees * * * Description Given n, how many structurally unique BST's (binary searc...
分类:其他好文   时间:2015-03-21 12:40:04    阅读次数:135
【LeetCode】190. Reverse Bits
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ...
分类:其他好文   时间:2015-03-21 12:35:31    阅读次数:143
LeetCode OJ Convert Sorted Array to Binary Search
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. class Solution { public: vector Num; TreeNode *sortedArrayToBST(vector &num) { if (num.size() == 0) r...
分类:其他好文   时间:2015-03-21 11:24:00    阅读次数:169
LeetCode – Refresh – Minimum Depth of Binary Tree
1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode(i...
分类:其他好文   时间:2015-03-21 08:35:28    阅读次数:123
LeetCode – Refresh – Maximum Depth of Binary Tree
1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode(i...
分类:其他好文   时间:2015-03-21 06:22:17    阅读次数:111
uvalive 6300 Signed Binary Representation of Integers
6300 Signed Binary Representation of IntegersComputing ax mod n for large integers x and n is the most time-consuming process in most public-keycrypto...
分类:其他好文   时间:2015-03-21 01:04:35    阅读次数:268
LeetCode Same Tree
Same Tree Total Accepted: 52651 Total Submissions: 125166 My Submissions Question Solution Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered e...
分类:其他好文   时间:2015-03-20 23:50:46    阅读次数:166
广东清算中心笔试题
1、完全二叉树(Complete Binary Tree)的概念若设二叉树的深度为h,除第 h 层外,其它各层 (1~h-1) 的结点数都达到最大个数,第 h 层所有的结点都连续集中在最左边,这就是完全二叉树。完全二叉树是由满二叉树而引出来的。对于深度为K的,有n个结点的二叉树,当且仅当其每一个结点...
分类:其他好文   时间:2015-03-20 21:51:51    阅读次数:122
LeetCode Reverse Bits
Reverse Bits Total Accepted: 8148 Total Submissions: 29905 My Submissions Question Solution Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary a...
分类:其他好文   时间:2015-03-20 20:31:03    阅读次数:105
leetcode_144_Binary Tree Preorder Traversal
具体思路和中序遍历是一致的,只是访问结点的值的时机不同罢了,具体思路参见:http://blog.csdn.net/mnmlist/article/details/44312315...
分类:其他好文   时间:2015-03-20 16:33:15    阅读次数:121
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!