码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
Convert Sorted Array to Binary Search Tree
[leetcode]Given an array where elements are sorted in ascending order, convert it to a height balanced BST....
分类:其他好文   时间:2014-10-08 10:09:55    阅读次数:164
Leetcode Path Sum
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ /** * http...
分类:其他好文   时间:2014-10-08 01:05:04    阅读次数:253
LeetCode刷题笔录Add Binary
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".详细一位一位地加即可了,考虑进位的问题。还有最后记得把生成的string反过来再返回,由于我们...
分类:其他好文   时间:2014-10-07 22:22:34    阅读次数:174
15、高可用 PXC(percona xtradb cluster) 搭建
安装环境:集群名pxc_lk节点1:192.168.1.20节点2:192.168.1.21节点3:192.168.1.22所有节点安装wgethttp://www.percona.com/redir/downloads/XtraBackup/LATEST/binary/redhat/6/x86_6...
分类:数据库   时间:2014-10-07 19:53:44    阅读次数:366
LeetCode——Same Tree(判断两棵树是否相同)
问题: Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identic...
分类:其他好文   时间:2014-10-07 17:55:43    阅读次数:127
CareerCup Chapter 4 Trees and Graphs
struct TreeNode{ int val; TreeNode* left; TreeNode* right; TreeNode(int val):val(val),left(NULL),right(NULL){}};Not all binary trees are bina...
分类:其他好文   时间:2014-10-07 15:02:23    阅读次数:221
leetcode -- Binary Tree Maximum Path Sum
过去只是人生经历,并不是人生负担[问题描述]Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below bi...
分类:其他好文   时间:2014-10-07 13:47:03    阅读次数:195
ubuntu eclipse CDT 问题
问题一:ubuntu eclipse c++ launch failed binary not found 解决:建完项目后 查看在项目中是不是有debug文件夹,说明没有编译,只是需要做如下操作 Project ->Build Poject 构建项目,这是应该会出现debug文件,这时你的程序就可以运行了...
分类:系统相关   时间:2014-10-07 10:02:53    阅读次数:148
[LeetCode] Flatten Binary Tree to Linked List
大象放入冰箱几步的思路处理这问题就好了 1.把左子树弄平, 2. 插入到根节点和根节点的右子树之间,3. 重复1,2 思路不难,代码上有点混乱,细节实现是:把root的左子树弄成flatten的 flatten(root.left),把右子树保存起来 temp=root.right,让root.right=root.left, 然后断掉左边,root.left=null. 然后一直走到右边的...
分类:其他好文   时间:2014-10-07 06:20:13    阅读次数:194
Poj 2499 Binary Tree
题目链接:http://poj.org/problem?id=2499思路: 结点向左边移动时结点(a, b)变为( a+b, b),向右边移动时( a, b )变为( a, a + b); 为求最短路径,考虑从已经知道的结点(a, b)开始找出最短路径回到根节点(1, 1); 即向左移动次数...
分类:其他好文   时间:2014-10-06 23:44:30    阅读次数:166
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!