码迷,mamicode.com
首页 >  
搜索关键字:reverse intger    ( 5102个结果
带你走进汇编的世界
本文所做的实验是用汇编实现字符串逆向排序的功能。其实就相当于C语言中的reverse( ) 函数。简要叙述:将字符串 ''abcdefghij" 放到指定的内存位置,同时分配一段内存作为栈然后将字符串入栈再出栈,以此实现字符串逆向排序功能一下就是代码:编译:连接:调试:初始化阶段:观察右边内存中的数...
分类:其他好文   时间:2014-10-28 00:26:56    阅读次数:211
[LeetCode]Reverse Integer
Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 考虑输入是abc,返回结果是cba,那么如果用除法(除以10)取余数操作的话,是先入先出的操作(第一次入abc%10=c),因此选择使用队列。 复习队列的方法有q.size(),q.front()...
分类:其他好文   时间:2014-10-27 23:05:42    阅读次数:200
[LeetCode] 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 ...
分类:其他好文   时间:2014-10-27 22:58:01    阅读次数:269
整数逆序
1 class Solution 2 { 3 public: 4 5 int reverse(int x){ 6 int result=0; 7 while(x!=0) 8 { 9 ...
分类:其他好文   时间:2014-10-27 22:55:25    阅读次数:165
ACM step 1.2.2 Text Reverse
gnatius likes to write words in reverse way. Given a single line of text which is written by Ignatius, you should reverse all the words and then outpu...
分类:其他好文   时间:2014-10-27 20:57:39    阅读次数:218
LeetCode-Reverse Nodes in k-Group
Given this linked list:1->2->3->4->5Fork= 2, you should return:2->1->4->3->5Fork= 3, you should return:3->2->1->4->5思路:一开始是想要动态规划的方式,即写一个反转函数,每K个字符调用一...
分类:其他好文   时间:2014-10-27 10:48:04    阅读次数:201
Cocos2d-x 学习笔记2 - Actions(Basic) - 未完成
//Example://reverse \ clone \ DelayTime \ EaseIn | EaseOutvoid SpriteEase::onEnter(){ EaseSpriteDemo::onEnter(); auto move = MoveBy::create(...
分类:其他好文   时间:2014-10-26 19:40:07    阅读次数:273
字符串算法
字符串逆转void reverse(char* str,int beg,int end){ int times = (end- beg +1)/2; while(times > 0) { char tmp = str[end]; str[end--] =...
分类:编程语言   时间:2014-10-26 16:52:45    阅读次数:114
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...
分类:其他好文   时间:2014-10-26 15:30:30    阅读次数:159
【LeetCode】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...
分类:其他好文   时间:2014-10-26 14:21:29    阅读次数:243
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!