码迷,mamicode.com
首页 >  
搜索关键字:swap nodes in pairs    ( 8848个结果
排序算法 java实现
为了笔试,用了一下午准备了下各种排序算法的java实现。给大家提供个方便,把代码都贴出来,算法的具体过程以后再补。冒泡排序 1 package sort; 2 3 public class BubbleSort { 4 public static void swap(int[] source,in....
分类:编程语言   时间:2014-09-09 11:33:38    阅读次数:247
Binary Tree Level Order Traversal <leetcode>
Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{3,9,2...
分类:其他好文   时间:2014-09-09 11:32:38    阅读次数:240
Hypervisor scheduler
Techniques for configuring ahypervisorschedulerto make use of cache topology of processors and physical memory distances between NUMA nodes when makin...
分类:其他好文   时间:2014-09-09 11:31:48    阅读次数:296
63. Swap Nodes in Pairs && Rotate List && Remove Nth Node From End of List
注意: 前两个互换的时候,head 要改变位置。还要有一个 pre 指针。注意: 前两个互换的时候,head 要改变位置。还要有一个 pre 指针。思路: 双指针。
分类:其他好文   时间:2014-09-09 10:30:28    阅读次数:292
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 ...
分类:其他好文   时间:2014-09-07 22:19:15    阅读次数:280
Binary Tree Postorder Traversal <leetcode>
Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1].No...
分类:其他好文   时间:2014-09-07 14:44:25    阅读次数:208
Leetcode: 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 e...
分类:其他好文   时间:2014-09-07 13:27:15    阅读次数:230
PADS技巧--差分线画法
第一步:添加差分信号线。1、用PADS router打开我们的工程文件,在Project Explorer中选择差分线网络,选中后“Ctrl+C”复制,如下图所示,2、选中“Differential Pairs”,然后“Ctrl + V”粘贴,这样就将一对差分信号线添加到差分网络中,如下图所示第二步...
分类:其他好文   时间:2014-09-06 19:57:13    阅读次数:357
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-06 16:05:23    阅读次数:182
【rope】bzoj1269 [AHOI2006]文本编辑器editor
维护一个字符串,支持以下操作:主要就是 成段插入、成段删除、成段翻转。前两个操作很好通过rope实现。第三个操作也不难,维护两个rope,一个正向,一个反向,翻转时swap一下就行了。rope教程:http://blog.csdn.net/iamzky/article/details/3834865...
分类:其他好文   时间:2014-09-06 16:03:04    阅读次数:324
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!