码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
Same Tree
废话不多说,直接上代码,哈哈,痛快:/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL)...
分类:其他好文   时间:2015-07-02 14:10:48    阅读次数:91
Kth Smallest Element in a BST
https://leetcode.com/problems/kth-smallest-element-in-a-bst/Given a binary search tree, write a functionkthSmallestto find thekth smallest element in ...
分类:其他好文   时间:2015-07-02 11:58:59    阅读次数:190
Add Binary
有三点收获: 第一:string类型的变量可以直接相互赋值。 第二:begin()-1在本地VS2012会出现运行时错误迭代器错误,而在leetcode在先提交时并没有出现错误。 第三:反转string类型变量,直接如下使用即可: reverse(reversedResult.begin(), reversedResult.end());头文件并不需要添加。 下面是程序代码#include...
分类:其他好文   时间:2015-07-02 10:13:28    阅读次数:96
#leetcode#Kth Smallest Element in a BST
Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note:  You may assume k is always valid, 1 ≤ k ≤ BST's total elements. Follow up: What if the...
分类:其他好文   时间:2015-07-02 10:09:45    阅读次数:110
leetCode(27):Maximal Square
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area. For example, given the following matrix: 1 0 1 0 0 1 0 1 1 1 1 1 1 1 1 1 0 0 1 0 ...
分类:其他好文   时间:2015-07-02 10:07:01    阅读次数:115
Leetcode 230 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-02 09:53:05    阅读次数:128
LeetCode_Binary Tree Maximum Path Sum
LeetCode_Binary Tree Maximum Path Sum 解题思路...
分类:其他好文   时间:2015-07-01 23:43:24    阅读次数:242
[Binary Hacking] ABI and EABI
Following are some general papers about ABI and EABI. Entrance https://en.wikipedia.org/wiki/Application_binary_interface PowerPc Embedded Application Binary Interface (EABI) : 32...
分类:其他好文   时间:2015-07-01 18:16:05    阅读次数:130
Server Job: error: String or binary data would be truncated. The statement has been terminated.
"String or binary data would be truncated. The statement has been terminated" most probably means that the size ofvalue you want to insert is larger t...
分类:其他好文   时间:2015-07-01 17:50:03    阅读次数:128
LintCode 二叉树的遍历 (非递归)
前序: class Solution { public: /** * @param root: The root of binary tree. * @return: Preorder in vector which contains node values. */ vector preorderTraversal(TreeNode *root) {...
分类:其他好文   时间:2015-07-01 16:06:10    阅读次数:173
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!