码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
LeetCode#226 Invert Binary Tree
Problem Definition: Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9 to 4 / \ 7 2 / \ / \9 6 3 1Trivia:This pr...
分类:其他好文   时间:2015-07-16 13:46:24    阅读次数:97
Get Level of a node in a Binary Tree
Given a Binary Tree and a key, write a function that returns level of the key.For example, consider the following tree. If the input key is 3, then yo...
分类:其他好文   时间:2015-07-16 13:39:44    阅读次数:90
Android——coredump 配置
kernel支持: 由linux支持,进程崩溃时记录存储堆栈空间,寄存器等相关内容,保留致命现场数据,便于分析查找根源。 编译项: Symbol: COREDUMP [=y] Type : boolean Prompt: Enable core dump support Location: (1) -> Userspace binary formats Defined at fs...
分类:移动开发   时间:2015-07-16 09:47:56    阅读次数:190
[LeetCode] Recover Binary Search Tree
As the note in the problem statement, this problem has a straight-forward O(n)-space solution, which is to generate the inorder traversal results of t...
分类:其他好文   时间:2015-07-16 00:41:35    阅读次数:115
[leedcode 87] Scramble String
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation...
分类:其他好文   时间:2015-07-16 00:36:56    阅读次数:151
Lowest Common Ancestor of a Binary Tree
题目地址:点击打开链接 解法一:对于深度过高的case过不了。 /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NU...
分类:其他好文   时间:2015-07-15 22:53:52    阅读次数:163
[leedcode 85] Maximal Rectangle
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.public class Solution { public...
分类:其他好文   时间:2015-07-15 22:39:04    阅读次数:270
LeetCode——Add Binary
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".求数字字符串的二进制和。同之前的数组代表数字,两个数组相加一样。仅仅只是进位变成了2.可能两个...
分类:其他好文   时间:2015-07-15 22:33:49    阅读次数:113
Kth Smallest Element in a BST
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 tota...
分类:其他好文   时间:2015-07-15 18:33:34    阅读次数:80
LeetCode#235 Lowest Common Ancestor of a Binary Search Tree
Problem Definition: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definiti.....
分类:其他好文   时间:2015-07-15 18:21:31    阅读次数:85
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!