Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Callingnext()will return the next...
分类:
其他好文 时间:
2015-04-12 14:38:25
阅读次数:
134
题目链接:maximal-rectangle
import java.util.Arrays;
/**
* Given a 2D binary matrix filled with 0's and 1's,
* find the largest rectangle containing all ones and return its area.
*
*/
public cl...
分类:
其他好文 时间:
2015-04-12 13:28:40
阅读次数:
189
Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.For exampl...
分类:
其他好文 时间:
2015-04-12 11:48:52
阅读次数:
100
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.
For example:
Given the following binary tree,
1 ...
分类:
其他好文 时间:
2015-04-12 10:41:52
阅读次数:
149
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.
题意:求0,1矩阵中,1构成的最大矩阵。
思路:借用了上一题,首先我们先计算出dp[i][j]表示到第i行第j列时,此时这一列的连续1的个数,然后计算每一行...
分类:
其他好文 时间:
2015-04-12 10:37:34
阅读次数:
118
Binary Tree Right Side ViewGiven a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered fr...
分类:
其他好文 时间:
2015-04-11 19:09:34
阅读次数:
124
Image
二进制数据类型
Image 数据类型用来存储变长的二进制数据,最大可达231-1或大约20亿字节
Binary
二进制数据类型
Binary 数据类型用来存储可达8000字节长的二进制数据
Bit
整型
Bit数据类型是整型,其值只能是0,1或空值(NULL)。这种数据类型用于存储只有两种可能值的数据,如Ye...
分类:
数据库 时间:
2015-04-11 18:04:43
阅读次数:
195
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 identical and the nodes have the same value.简而言之,判断两棵二叉树是否相等,这里...
分类:
其他好文 时间:
2015-04-11 18:02:35
阅读次数:
90
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.
For example:
Given the following binary tree,
1...
分类:
其他好文 时间:
2015-04-11 17:52:51
阅读次数:
109
二叉查找树(Binary Search Tree)也称二叉搜索树、有序二叉树(ordered binary tree),排序二叉树(sorted binary tree),是指一棵空树或者具有下列性质的二叉树:若任意节点的左子树不空,则左子树上所有结点的值均小于它的根结点的值;若任意节点的右子树不空...
分类:
其他好文 时间:
2015-04-11 17:47:51
阅读次数:
121