码迷,mamicode.com
首页 >  
搜索关键字:reverse    ( 5099个结果
leetcode || 92、Reverse Linked List II
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
LeetCode: Reverse Nodes in k-Group
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
[LeetCode] Add Two Numbers
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
2. 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 sing...
分类:其他好文   时间:2015-04-15 12:53:30    阅读次数:206
[LeetCode] Evaluate Reverse Polish Notation
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
C++STL之整理算法
这里主要介绍颠倒、旋转、随机排列和分类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
[LeetCode] Reverse Words in a String
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
编写一个函数reverse_string(char * string)(递归实现)
#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
Leetcode 25 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...
分类:其他好文   时间:2015-04-14 09:48:49    阅读次数:104
Leetcode 92 Reverse Linked List ii
/** * 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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!