码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
[LeetCode]Balanced Binary Tree
Balanced Binary TreeGiven a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tre...
分类:其他好文   时间:2015-09-10 00:21:23    阅读次数:178
leetcode笔记:Gray Code(2016腾讯软件开发笔试题)
一.题目描述 The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the code, print the...
分类:其他好文   时间:2015-09-09 23:00:04    阅读次数:422
【LeetCode】112 - 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...
分类:其他好文   时间:2015-09-09 21:22:44    阅读次数:168
【leetcode】Recover Binary Search Tree
问题:鉴于二叉搜索树。有两个节点不小心换位置,现在,我们需要修改。它不改变树的结构。分析:二叉排序树的遍历是有序。所以这个问题是建立在序模板的问题,所以我们可以先序,并配有pre指针指向当前遍历结果中的最后一个结点,即下次遍历前的前一个结点。然后就能够通过将当前结点与pre结点进行比較。来推断是否有...
分类:其他好文   时间:2015-09-09 19:24:38    阅读次数:107
[LeetCode]Gray Code
Gray CodeThe gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the tot...
分类:其他好文   时间:2015-09-09 18:56:08    阅读次数:114
Binary Search(Easy,二分搜索)
题目描述:For a given sorted array (ascending order) and atargetnumber, find the first index of this number inO(log n)time complexity.If the target number ...
分类:其他好文   时间:2015-09-09 16:21:30    阅读次数:195
leetcode Unique Binary search Trees
计算N个节点的BST树有多少种 经典的DP了,dp[n]表示n个节点的树有dp[n]种,dp方程见代码 class?Solution?{ public: ????int?numTrees(int?n)?{ ???????vector<int>?dp(n+1); ???????dp[...
分类:其他好文   时间:2015-09-09 13:37:41    阅读次数:148
pat1066. Root of AVL Tree (25)
1066. Root of AVL Tree (25)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueAn AVL tree is a self-balancing binary search tree. In an AVL tre...
分类:其他好文   时间:2015-09-09 13:04:11    阅读次数:156
[LeetCode#69] Sqrt(x)
Problem:Implementint sqrt(int x).Compute and return the square root ofx.Conclusion for Binary Search Problem:Binary search is such an elegant way of s...
分类:其他好文   时间:2015-09-09 11:21:36    阅读次数:138
mysql show
1.show命令语法SHOW {BINARY | MASTER} LOGSSHOW BINLOG EVENTS [IN 'log_name'] [FROM pos] [LIMIT [offset,] row_count]SHOW CHARACTER SET [like_or_where]SHOW C...
分类:数据库   时间:2015-09-09 11:15:52    阅读次数:189
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!