码迷,mamicode.com
首页 >  
搜索关键字:reverse intger    ( 5102个结果
leetcode Reverse words in a string Python
刚接触python不久,被python的简洁强大迷倒了,在做leetcode,Reverse words in a string时,刚开始还是传统的思路想着怎么处理空格问题一直测试不通过,写的很罗嗦被师弟吐槽说你写的代码好丑,好心塞。 废话不多说直接奉上思路代码: 翻转字符串如:"Hello...
分类:编程语言   时间:2014-09-19 15:32:35    阅读次数:275
leetcode_num4_Reverse Integer
题目: Reverse digits of an integer. Have you thought about this? Here are some good questions to ask before coding. Bonus points for you if you have already thought through this! If the inte...
分类:其他好文   时间:2014-09-18 18:52:54    阅读次数:191
OutputCache属性详解一Location
目录OutputCache概念学习OutputCache属性详解(一)OutputCache属性详解一LocationWeb应用程序中的使用缓存位置:客户端缓存(Client Caching)代理缓存(Proxy Caching)反向代理缓存(Reverse Proxy Caching)服务器缓存(...
分类:其他好文   时间:2014-09-18 18:13:04    阅读次数:180
Reverse Integer
[leetcode]Reverse Integer...
分类:其他好文   时间:2014-09-17 21:55:22    阅读次数:209
自变量的变换
自变量的变换涉及到三个基本变换方式:伸缩(scale)、时移(shift)、反转(reverse)。变换通用的形式:x(t)->x(at+b)两种方法:可变对称抽和固定对称抽。1、可变对称抽:在三种基本变换中, 反转是相对于对称轴 t = 0 进行的, 而尺度变换中无论a为何值,t = 0的信号 x...
分类:其他好文   时间:2014-09-17 14:56:12    阅读次数:289
Reverse Nodes in k-Group[leetcode]递归和非递归的解法
题目不难,但是容易出错,需要考虑各种边界情况 非递归代码如下: ListNode *reverseKGroup(ListNode *head, int k) { if (head == NULL || k <= 1) return head; ListNode * start = NULL, * end = NULL, *newHead = NULL, *p...
分类:其他好文   时间:2014-09-16 19:00:54    阅读次数:201
Next Permutation[leetcode]
基本思路是从后往前找到第一个递减的数num[index],并与之前的第一个大于num[index]的数交换位置。 注意交换后[index+1...n-1]仍是非递减的,所以只需要reverse一下,使其变成非递增的 void nextPermutation(vector &num) { int index = num.size() - 2; int rI...
分类:其他好文   时间:2014-09-16 17:23:40    阅读次数:116
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-09-15 12:41:48    阅读次数:133
数组排序
一直都对数组排序有点混淆不清,今天闲下来硬是找了些资料好好补课一下,感觉如下这篇还不错,于是转过来了。 reverse()、sort() 和 sortOn() reverse() 倒序排列sort() 按照多种预定义的方式对数组进行排序,甚至可用来创建自定义排序算法。sortOn() 方法可用来对对...
分类:其他好文   时间:2014-09-15 12:35:08    阅读次数:155
[LeetCode] Reverse Linked List II @ Python
原题地址:https://oj.leetcode.com/problems/reverse-linked-list-ii/题意:Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Gi...
分类:编程语言   时间:2014-09-14 23:38:47    阅读次数:239
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!