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...
分类:
其他好文 时间:
2015-01-22 23:17:01
阅读次数:
139
Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL.No...
分类:
其他好文 时间:
2015-01-22 19:42:54
阅读次数:
112
DescriptionIgnatius likes to write words in reverse way. Given a single line of text which is written by Ignatius, you should reverse all the words an...
分类:
其他好文 时间:
2015-01-21 21:59:44
阅读次数:
192
原题地址分两步:1. 试探。看是否还有k个节点可以翻转2. 翻转。[]->[]->[]->[1]->[2]->[3]->[4]->[]->[]->[]->NULL |------------------| 假设要翻转这一段翻转前: ...
分类:
其他好文 时间:
2015-01-21 21:53:32
阅读次数:
156
What?
列出目录的内容
How?
ls [-ABCFGHLOPRSTUW@abcdefghiklmnopqrstuwx1]
[file ...]
Points——常用的参数
ls -l 显示目录文件的详细信息[linux文件的属性]
ls -t 按修改时间逆序排列
ls -r reverse 按相反顺序排列
ls -F 标识文件的类型
/表示目录...
分类:
系统相关 时间:
2015-01-20 20:37:52
阅读次数:
198
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...
分类:
其他好文 时间:
2015-01-20 17:31:13
阅读次数:
136
输入两个非负10进制整数A和B( 2 #include 3 using namespace std; 4 /* 5 char str1[35]; 6 char str2[35]; 7 void Reverse(char str1 []) 8 { 9 char str[35];10 f...
分类:
其他好文 时间:
2015-01-20 13:29:34
阅读次数:
172
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is.You...
分类:
其他好文 时间:
2015-01-19 15:56:02
阅读次数:
161
Reverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2->5->NULL.Note:Given m, n satisfy the following condi...
分类:
其他好文 时间:
2015-01-19 15:54:39
阅读次数:
141
题目:
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 and return it ...
分类:
编程语言 时间:
2015-01-18 18:38:24
阅读次数:
275