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 example:
Given binary tree {3,9,20,#,#,15,7},
...
分类:
其他好文 时间:
2014-10-03 19:41:45
阅读次数:
189
SPOJ Problem Set (classical)
375. Query on a tree
Problem code: QTREE
You are given a tree (an acyclic undirected connected graph) with N nodes, and edges numbered
1, 2, 3...N-1.
We wi...
分类:
其他好文 时间:
2014-10-02 12:56:22
阅读次数:
232
[leetcode]Given a linked list, swap every two adjacent nodes and return its head....
分类:
其他好文 时间:
2014-10-02 10:53:52
阅读次数:
162
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:
其他好文 时间:
2014-10-02 02:34:02
阅读次数:
227
Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o...
分类:
其他好文 时间:
2014-10-01 19:55:31
阅读次数:
122
Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your algor...
分类:
其他好文 时间:
2014-10-01 13:46:11
阅读次数:
190
request_mem_region仅仅是linux对IO内存的管理,意思指这块内存我已经占用了,别人就不要动了,也不能被swap出去。使用这些寄存器时,可以不调用request_mem_region,但这样的话就不能阻止别人对他的访问了。http://blog.csdn.net/skyflying...
分类:
其他好文 时间:
2014-10-01 10:16:01
阅读次数:
195
If you have a relatively small collection of key-values that you'd like to save, you should use the SharedPreferences APIs.
ASharedPreferences object
points to a file containing key-value pairs an...
分类:
其他好文 时间:
2014-10-01 02:51:10
阅读次数:
232
题目大意:输入一个字符串,输出它的下一个字典序排列。
字典序算法思想:
1.从右向左寻找字符串找出第一个a[i]
2.从右向左找出第一个大于a[j]的元素a[i];
3.swap(a[i],a[j])
4.将a[i]......到a[stelen(a)]倒序
5.输出a
代码如下:
#include
#include
#include
#include
#include
usin...
分类:
其他好文 时间:
2014-09-30 22:56:00
阅读次数:
235
虚拟机Virtual Box装的Kali Linux,是Debian的发行版本,安装过程不说了,不是硬盘安装也没什么说的,由于是新手所以只有两个分区,一个【/】和一个【swap】 装好之后是xwindow的界面,可以登录,也可以ctrl+alt+F1~F6切换六个文字终端,需要注意的是文字终端登录时...
分类:
系统相关 时间:
2014-09-30 20:57:40
阅读次数:
309