码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
Leetcode 190 Reverse Bits
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ...
分类:其他好文   时间:2015-07-14 17:21:41    阅读次数:109
[LeetCode] Maximum Depth of Binary Tree
Question:Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the fa...
分类:其他好文   时间:2015-07-14 17:15:29    阅读次数:106
[LeetCode] Symmetric Tree
Question:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: ...
分类:其他好文   时间:2015-07-14 17:08:38    阅读次数:69
Invert Binary Tree
该题比较简单,递归交换每一个节点的左右子树即可。 class Solution { public: TreeNode* invertTree(TreeNode* root) { if(root == NULL) return NULL; TreeNode* tmp = root -> left; root -> le...
分类:其他好文   时间:2015-07-14 15:46:50    阅读次数:89
堆排序 Heap Sort
堆排序虽然叫heap sort,但是和内存上的那个heap并没有实际关系。算法上,堆排序一般使用数组的形式来实现,即binary heap。我们可以将堆排序所使用的堆int[] heap视为一个完全二叉树,即,除非最后一层右侧有空结点,其他都为满结点。对于任意heap[i]有如下一些性质:1. i从...
分类:编程语言   时间:2015-07-14 15:31:31    阅读次数:147
096 Unique Binary Search Trees
题目: 096 Unique Binary Search Trees这道题目就是catalan数, 因为递归关系 为 代码为class Solution: # @param {integer} n # @return {integer} def numTrees(self, n)...
分类:其他好文   时间:2015-07-14 15:19:13    阅读次数:93
【Kth Smallest Element in a BST 】cpp
题目:Given a binary search tree, write a functionkthSmallestto find thekth smallest element in it.Note:You may assume k is always valid, 1 ≤ k ≤ BST's t...
分类:其他好文   时间:2015-07-14 15:13:55    阅读次数:98
[LeetCode] Balanced Binary Tree
Question: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 ...
分类:其他好文   时间:2015-07-14 15:06:50    阅读次数:84
[LeetCode] Binary Tree Level Order Traversal II
Question:Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root...
分类:其他好文   时间:2015-07-14 15:04:32    阅读次数:98
让x86的android模拟器能模拟arm架构系统
houdini 是intel 研发的ARM binary translator解决Android x86 系统的兼容性问题可以安装各种安卓中文输入法,允许各种安卓游戏,号称可以兼容90%以上的安卓应用!关键词:Android x86中文输入法应用兼容性。在玩Android x86 系统的时候,很多童...
分类:移动开发   时间:2015-07-14 15:01:42    阅读次数:153
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!