码迷,mamicode.com
首页 >  
搜索关键字:reverse    ( 5099个结果
七日Python之路--第八天(一些琐碎)
字符串相加的时候尽量使用:join ????在while True 循环的时候,尽量使用:while 1 ????字符串处理: ????????分组 str.split(‘key‘) ????????列表翻转:list.reverse()...
分类:编程语言   时间:2014-07-29 16:17:09    阅读次数:176
HDU 1062 Text Reverse
Text Reverse Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 16342    Accepted Submission(s): 6205 Problem Description Ignatius lik...
分类:其他好文   时间:2014-07-29 13:22:27    阅读次数:212
LeetCode : reverse integer
解法: 1 class Solution { 2 public: 3 int reverse(int x) { 4 int signal = (x>0)? 1:-1; /* signal记录正负号 */ 5 x=abs(x); 6 int ...
分类:其他好文   时间:2014-07-29 11:25:06    阅读次数:197
LeetCode Reverse Nodes in k-Group
class Solution {public: ListNode *reverseKGroup(ListNode *head, int k) { if (k next = rhead; } last = rtail; } ...
分类:其他好文   时间:2014-07-28 11:22:20    阅读次数:227
LeetCode: Reverse Words in a String
LeetCode: Reverse Words in a StringGiven an input string, reverse the string word by word. For example,Given s = "the sky is blue",return "blue is sky...
分类:其他好文   时间:2014-07-27 23:33:19    阅读次数:173
LeetCode: Reverse Words in a String:Evaluate Reverse Polish Notation
LeetCode: Reverse Words in a String:Evaluate Reverse Polish NotationEvaluate the value of an arithmetic expression in Reverse Polish Notation.Valid op...
分类:其他好文   时间:2014-07-27 23:32:59    阅读次数:262
字符串反转
java实现的字符串翻转,能想到的这几种方法 如果有其他方法,欢迎交流 //字符串反转 public class ReverseString { public String reverse1(String str){ StringBuffer sb = new StringBuffer(str); str = sb.reverse().toString(); return str...
分类:其他好文   时间:2014-07-27 11:09:12    阅读次数:211
HDU 1062 Text Reverse(水题,字符串处理)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1062解题报告:注意一行的末尾可能是空格,还有记得getchar()吃回车符。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #incl...
分类:其他好文   时间:2014-07-27 10:12:02    阅读次数:149
LeetCode题解
Reverse Words in a String考虑几个特殊的情况1.若字符窜s=" "2.字符窜s=“a b d e”3.字符窜s=“ a”class Solution {public: void reverseWords(string &s) { int i; int c...
分类:其他好文   时间:2014-07-26 17:03:01    阅读次数:360
c++ vector反转reverse
[cpp] view plaincopytemplatevoidreverse(BidirectionalIteratorfirst,BidirectionalIteratorlast);[cpp] view plaincopy如果不是改变原来的容器,而是翻转之后放在新容器里面,直接用reverse...
分类:编程语言   时间:2014-07-26 16:59:21    阅读次数:394
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!