码迷,mamicode.com
首页 >  
搜索关键字:swap nodes in pairs    ( 8848个结果
LeetCode: Add Two Numbers 解题报告
Add Two NumbersYou are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes co...
分类:其他好文   时间:2014-10-20 18:50:54    阅读次数:111
平面上N个点,每两个点都确定一条直线,求出斜率最大的那条直线所通过的两个点
#include<iostream>? #include<algorithm>? using namespace std;? void swap(int &a,int &b) { ? ? ? ? ?int tmp = a; ? ? ?a = b; ? ? ?b = tmp; }? void ssort(int x[],int y[],int len) { ? ...
分类:其他好文   时间:2014-10-20 17:40:06    阅读次数:178
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-10-20 14:46:35    阅读次数:230
leetcode第23题--Swap Nodes in Pairs
Problem: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.Yo...
分类:其他好文   时间:2014-10-20 13:15:42    阅读次数:195
Leetcode | Swap Nodes in Pairs
Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your alg...
分类:其他好文   时间:2014-10-20 09:49:08    阅读次数:181
linux mkfs命令参数及用法详解---linux格式化文件系统命令(包括swap分区)
mkfs命令linux格式化磁盘命令 linux mkfs 指令:mkfs 使用权限 : 超级使用者 使用方式 : mkfs [-V] [-t fstype] [fs-options]filesys [blocks] [-L Lable] 说明 : 建立 linux 档案系统...
分类:系统相关   时间:2014-10-19 22:47:57    阅读次数:307
Binary Tree Preorder Traversal and Binary Tree Postorder Traversal
Binary Tree Preorder TraversalGiven a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ ...
分类:其他好文   时间:2014-10-19 22:42:10    阅读次数:223
javascript 哈夫曼树构造
function Node(data) { this.data = data; this.left = null; this.right = null; } /*测试用例*/ var datasarray = [1, 54, 23, 64, 53, 87, 97]; function createHufuTree(datasarray) { var nodes = []; /...
分类:编程语言   时间:2014-10-19 11:38:02    阅读次数:169
c - 冒泡/选择排序.
1 #include 2 3 void 4 bubbleSort(int *, int); 5 6 void 7 selectSort(int *, int); 8 9 void10 show(int *, int);11 12 void13 swap(int *, int, int);1...
分类:编程语言   时间:2014-10-19 11:28:11    阅读次数:171
Implement Insert and Delete of Tri-nay Tree
Implement insert and delete in a tri-nary tree. A tri-nary tree is much like a binary tree but with three child nodes for each parent instead of two -...
分类:其他好文   时间:2014-10-19 02:40:16    阅读次数:236
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!