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
#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
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
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
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
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 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
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
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 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