码迷,mamicode.com
首页 >  
搜索关键字:swap nodes in pairs    ( 8848个结果
Binary Tree Postorder Traversal
问题描述 Given a binary tree, return the postorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 2 / 3 return [3,2,1]. Note: Recur...
分类:其他好文   时间:2014-09-02 21:23:55    阅读次数:317
Add Two Numbers
问题描述 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 digit. Add the two numbers...
分类:其他好文   时间:2014-09-02 19:57:55    阅读次数:166
Binary Tree Preorder Traversal
问题描述 Given a binary tree, return the preorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 2 / 3 return [1,2,3]. Note: Recurs...
分类:其他好文   时间:2014-09-02 17:50:45    阅读次数:136
OPStackComputeNodeMaintain
1,yum -y install openstack-nova-compute计算节点配置完成后 其配置文件默认非注释行内容如下;2,Ruiy手动部署如下endpoint的nova配置文件配置如上endpoint的具体novainone配置openstack 计算节点(compute nodes)b...
分类:其他好文   时间:2014-09-02 17:28:45    阅读次数:298
LeetCode 21 Generate Parentheses
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: "((()))", "(()())", "(())()", "()(())", "()()()...
分类:其他好文   时间:2014-09-02 10:29:44    阅读次数:186
Maximum Depth of Binary Tree
问题描述 Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. 解决方案 /** * Definition fo...
分类:其他好文   时间:2014-09-02 00:26:44    阅读次数:217
LeetCode: Partition List
LeetCode: Partition ListGiven a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.Y...
分类:其他好文   时间:2014-09-02 00:05:33    阅读次数:235
c++ 类模版、成员函数模版、函数模版 用法
C++函数模版与类模版。template void SwapFunction(T &first, T &second){}//函数模版template //类模版class CTemplate{public: void SWap(T &first, T &second){ }};#include.....
分类:编程语言   时间:2014-09-01 17:16:13    阅读次数:217
Same Tree
问题描述 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. 解决...
分类:其他好文   时间:2014-09-01 15:40:33    阅读次数:146
比memcache快的网站缓存
linux系统为我们提供tmpfs文件系统,tmpfs可以直接使用内存,同时在内存不够时使用swap分区来存储。另外需要注意的是tmpfs不具备持久性,重启后数据不保留,请务必注意,不过我们只用它来存储缓存文件,即使文件丢失也不影响网站访问,完全无风险。 /dev/shm/是一个设备文件,它使用就是tmpfs文件系统(注意:在Centos和Redhat下,/dev/shm目录是一个链接,指向...
分类:Web程序   时间:2014-09-01 14:08:33    阅读次数:247
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!