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 ...
分类:
其他好文 时间:
2016-09-23 06:37:32
阅读次数:
139
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For ...
分类:
其他好文 时间:
2016-09-23 06:37:17
阅读次数:
133
题意:给你n棵树,每棵树上有两个权值X H 对于X离散化 :3 7 1 5 3 6 -> 2 6 1 4 2 5,对于H一样 然后F = abs(X1-X2) S=min(H1,H2) 求出每一对F*S的总和 可以看到一边是求每个数与其他数的最小值,一边是求每个数与其他数的差距。因此我们可以排序一边 ...
分类:
编程语言 时间:
2016-09-23 01:27:12
阅读次数:
177
((((((((((谦(装)虚(逼)起始线)))))))))))一************************Linux根目录各文件*******************************************/bin##二进制binary可执行文件也就是系统命令(存放常用命令,该命令让电脑执行任务)/sbin##系统管理命令存放位置..
分类:
系统相关 时间:
2016-09-23 00:05:12
阅读次数:
204
树状数组(Binary Indexed Tree(BIT), Fenwick Tree)是一个查询和修改复杂度都为log(n)的数据结构。主要用于查询任意两位之间的所有元素之和,但是每次只能修改一个元素的值; 经过简单修改可 以在log(n)的复杂度下进行范围修改,但是这时只能查询其中一个元素的值( ...
分类:
编程语言 时间:
2016-09-22 21:29:28
阅读次数:
186
PostgreSQL can be installed using RPMs (binary) or SRPMs (source) managed by YUM. This is available for the following Linux distributions (both 32- an ...
分类:
数据库 时间:
2016-09-22 11:20:29
阅读次数:
255
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example:Given binary tree [3 ...
分类:
其他好文 时间:
2016-09-22 09:53:35
阅读次数:
198
1. 前序遍历 1.1 前序遍历的非递归的方式 利用stack while (!stack.isEmpty()) { pop作为根节点; 根节点加入result list; 把右边节点加入到stack; 把左边节点加入到stack; } 1 public class Solution { 2 pub ...
分类:
其他好文 时间:
2016-09-22 08:46:51
阅读次数:
208
Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent node) or empty, flip it up ...
分类:
其他好文 时间:
2016-09-22 06:35:56
阅读次数:
130
278 First Bad Version23.7%Easy 278. First Bad Version 349 Intersection of Two Arrays44.5%Easy 374 Guess Number Higher or Lower32.2%Easy 350 Intersecti ...
分类:
其他好文 时间:
2016-09-22 06:34:04
阅读次数:
175