problem:
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:
Give...
分类:
其他好文 时间:
2015-04-15 17:13:29
阅读次数:
132
Title :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...
分类:
其他好文 时间:
2015-04-15 16:32:57
阅读次数:
114
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 digit. Add the two numbers ...
分类:
其他好文 时间:
2015-04-15 13:39:11
阅读次数:
164
题目: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 sing...
分类:
其他好文 时间:
2015-04-15 12:53:30
阅读次数:
206
Evaluate Reverse Polish Notation
Evaluate the value of an arithmetic expression in Reverse Polish Notation.
Valid operators are +, -, *, /.
Each operand may be an integer or another expres...
分类:
其他好文 时间:
2015-04-15 11:27:46
阅读次数:
132
这里主要介绍颠倒、旋转、随机排列和分类4中常见的整理算法1、颠倒(反转)void reverse(_BidIt _First, _BidIt _Last)_OutIt reverse_copy(_BidIt _First, _BidIt _Last,_OutIt _Dest)2、旋转_FwdIt r...
分类:
编程语言 时间:
2015-04-15 09:32:54
阅读次数:
154
Reverse Words in a String
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
Update (2015-02-12):
For C program...
分类:
其他好文 时间:
2015-04-14 23:22:16
阅读次数:
167
#include
void reverse_string(char * string)
{
int count = 0;
char *p = string;
char temp;
while(*p != '\0')
{
count++; //计算字符串长度
p++;
}
if(count > 1)
{
temp = string[0]; //将最后一...
分类:
其他好文 时间:
2015-04-14 16:44:35
阅读次数:
124
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...
分类:
其他好文 时间:
2015-04-14 09:48:49
阅读次数:
104
/** * ID: 92 * Name: Reverse Linked List * Data Structure: Linked List * Time Complexity: * Space Complexity: * Tag: LinkList * Difficult: Medium ...
分类:
其他好文 时间:
2015-04-14 07:04:18
阅读次数:
192