码迷,mamicode.com
首页 >  
搜索关键字:swap nodes in pairs    ( 8848个结果
点破Redis的VM
Redis的某一个key的value被swap到文件上的时候,该key的value指向的RedisObject将会改变成VMPointer,VMPointer保存了该value在磁盘文件上的信息,包括起始页面的偏移和连续的页面数等。 typedef struct redisObject { unsigned type:4; unsigned storage:2;...
分类:其他好文   时间:2014-12-21 00:42:59    阅读次数:231
【LeetCode】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. 解答 求二叉树的最大深度。 递归:a.若二叉树为空,...
分类:其他好文   时间:2014-12-20 15:38:37    阅读次数:173
形参前的&&啥意思?
C++2011标准的右值引用语法去搜索“c++11右值引用”右值引用,当传入临时对象时可以避免一次拷贝。右值引用。举个例子C/C++ code?12345678//需要一次构造,两次赋值,即三次深拷贝 swap(T&a,T&b) { Ttmp(a); a=b; b=tmp; }使用右值引用后只需三次...
分类:其他好文   时间:2014-12-20 10:25:55    阅读次数:171
LeetCode Reverse Nodes in k-Group
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-12-20 01:59:41    阅读次数:190
【LeetCode】Binary Tree Level Order Traversal II
题目 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,#,#...
分类:其他好文   时间:2014-12-19 17:30:36    阅读次数:172
【LeetCode】Binary Tree Level Order Traversal
题目 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,9,20,#,#,15,7}, 3 / ...
分类:其他好文   时间:2014-12-19 17:30:08    阅读次数:167
Reorder List
Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→… You must do this in-place without altering the nodes' values. For example, Given {1,2,3,4}, reorder it to ...
分类:其他好文   时间:2014-12-19 17:29:23    阅读次数:232
【LeetCode】Reverse Nodes in k-Group
Reverse Nodes in k-GroupGiven 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...
分类:其他好文   时间:2014-12-19 17:19:23    阅读次数:231
【LeetCode】Swap Nodes in Pairs (3 solutions)
Swap Nodes in PairsGiven a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2-...
分类:其他好文   时间:2014-12-19 17:05:17    阅读次数:192
Binary Tree Inorder Traversal
Given a binary tree, return the inorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 2 / 3 return [1,3,2]. Note: Recursive solutio...
分类:其他好文   时间:2014-12-19 12:17:50    阅读次数:147
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!