码迷,mamicode.com
首页 >  
搜索关键字:reverse intger    ( 5102个结果
【C语言】编写一个函数reverse_string(char * string)(递归实现),将参数字符串中的字符反向排列,不能使用C函数库中的字符串操作函数。
//编写一个函数reverse_string(char * string)(递归实现) //实现:将参数字符串中的字符反向排列。 //要求:不能使用C函数库中的字符串操作函数。 #include #include void reverse_string(char const * string) { assert( string != NULL ); if( *string != '\0' ...
分类:编程语言   时间:2015-04-06 15:44:43    阅读次数:186
Add Two Numbers--LeetCode
题目: 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-04-06 15:42:46    阅读次数:108
【c语言】编写一个函数reverse_string(char * string)(递归实现) 实现:将参数字符串中的字符反向排列。
/*编写一个函数reverse_string(char * string)(递归实现) 实现:将参数字符串中的字符反向排列。 要求:不能使用C函数库中的字符串操作函数。*/ #include #include void reverse_string(char const * string) { assert( string != NULL ); if( *string != '\0' ...
分类:编程语言   时间:2015-04-05 21:58:58    阅读次数:155
Leetcode: Reverse Integer 正确的思路下-要考虑代码简化
题目:Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321Have you thought about this?Here are some good questions to ...
分类:其他好文   时间:2015-04-05 21:47:56    阅读次数:145
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 ...
分类:其他好文   时间:2015-04-05 18:53:07    阅读次数:110
LeetCode7~9 Reverse Integer/String to Integer (atoi)/Palindrome Number
一:Reverse Integer 题目: Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 链接:https://leetcode.com/problems/reverse-integer/ 分析:这题通过不断取余将余数存放在一个vecto...
分类:其他好文   时间:2015-04-05 14:40:31    阅读次数:161
Reverse Linked List II——LeetCode
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-04-05 11:54:52    阅读次数:128
PAT002 Reversing Linked List
题目:Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5...
分类:其他好文   时间:2015-04-05 11:50:33    阅读次数:135
LeetCode2 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 and return it ...
分类:其他好文   时间:2015-04-04 21:16:34    阅读次数:139
Reverse Linked List II--LeetCode
题目: 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, ...
分类:其他好文   时间:2015-04-04 12:20:09    阅读次数:138
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!