码迷,mamicode.com
首页 >  
搜索关键字:reverse    ( 5099个结果
leetcode[151]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".click to show clarification.Cl...
分类:其他好文   时间:2015-02-09 00:43:53    阅读次数:211
leetcode[150]Evaluate Reverse Polish Notation
Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express...
分类:其他好文   时间:2015-02-09 00:38:04    阅读次数:247
[LeetCode] 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-02-08 15:23:30    阅读次数:111
在遍历中使用 iterator/reverse_iterator 进行 Erase 的使用方法
在遍历中使用 iterator/reverse_iterator 进行 Erase 的使用方法罗朝辉 (http://blog.csdn.net/kesalin/)本文遵循“署名-非商业用途-保持一致”创作公用协议众所周知,在使用迭代器遍历 STL 容器时,须要特别留意是否在循环中改动了迭代器而导致...
分类:其他好文   时间:2015-02-07 20:12:54    阅读次数:406
LeetCode 025 Reverse Nodes in k-Group
题目描述:Reverse Nodes in k-GroupGiven a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is ...
分类:其他好文   时间:2015-02-07 17:22:26    阅读次数:146
LeetCode 007 Reverse Integer
题目描述:Reverse IntegerReverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321Have you thought about this?Here are some g...
分类:其他好文   时间:2015-02-07 14:23:35    阅读次数:153
Python sort 函数总结
sorted函数和sort方法sorted(iterable)#原容器不变,返回列表,容器可以是set,dict(返回key的排序列表)list.sort() #修改原列表sorted():sorted(iterable, cmp=None, key=None, reverse=False)...
分类:编程语言   时间:2015-02-07 13:01:19    阅读次数:209
leetcode_25_Reverse Nodes in k-Group
思路: 大概思路就是找出K个结点的起始位置和并将这K 个结点采用头插法的方式依次插入到这K个结点开始位置的前面一个位置之后,就可以了。 思路倒是很简单,但是指针所指的位置的捉摸是有点麻烦的,还有就是我竟然没有把创建的头节点和整个链表给链接起来。anyway,还是把这道题目给做出来了。...
分类:其他好文   时间:2015-02-07 11:48:02    阅读次数:138
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 as a link...
分类:其他好文   时间:2015-02-07 09:08:17    阅读次数:165
Reverse Linked List II java
1 public static ListNode reverseBetween(ListNode head, int m, int n) { 2 ListNode pre=head,current=head,mPre = new ListNode(0),mNode = new L...
分类:编程语言   时间:2015-02-06 18:23:59    阅读次数:141
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!