Populating Next Right Pointers in Each Node IIFollow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any ...
分类:
其他好文 时间:
2014-10-21 21:09:42
阅读次数:
267
Populating Next Right Pointers in Each Node TotalGiven a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next...
分类:
其他好文 时间:
2014-10-21 21:06:24
阅读次数:
247
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and ...
分类:
其他好文 时间:
2014-10-21 21:02:56
阅读次数:
259
[leetcode]Given a binary tree, determine if it is a valid binary search tree (BST)....
分类:
其他好文 时间:
2014-10-21 12:20:55
阅读次数:
176
题目:spoj 375. Query on a tree
题意:题意很清晰,就是给你一颗树,每两点之间有权值,然后改变一些权值,问一条路径上的最大值。
分析:入门题目,直接套树链模板
AC代码;
#include
#include
#include
#include
using namespace std;
const int N = 10010;
#define ...
分类:
其他好文 时间:
2014-10-21 12:16:36
阅读次数:
210
Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's. 1.....
分类:
其他好文 时间:
2014-10-21 11:53:17
阅读次数:
119
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的矩阵中找到一个面积最大的矩形,它内部所有的...
分类:
其他好文 时间:
2014-10-21 11:46:41
阅读次数:
129
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. 1 /** 2 * Definition for singly-linked ....
分类:
其他好文 时间:
2014-10-21 03:33:45
阅读次数:
168
本文学习自 https://github.com/alsotang/node-lessons/tree/master/lesson1 在安装NodeJs环境后,先进行一个简单的小例子。Hello World应用 1.首先在安装文件夹下创建一个测试文件夹test,然后创建app.js文件,cop...
分类:
Web程序 时间:
2014-10-21 00:55:25
阅读次数:
259
一、Map集合常见子类
HashTable:内部结构是哈希表,同步,此实现提供所有可选的映射操作,不允许使用 null 值和 null 键
(HashTable下有子类Properties,使用频率非常高,用来存储键值对型的配置文件信息和IO技术相结合)
HashMap:内部结构是哈希表,不同步,此实现提供所有可选的映射操作,并允许使用 null 值和 null 键。
Tree...
分类:
编程语言 时间:
2014-10-20 23:27:17
阅读次数:
346