码迷,mamicode.com
首页 >  
搜索关键字:reverse nodes    ( 8673个结果
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-05-16 23:18:16    阅读次数:360
Leetcode 数 Reverse Integer
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie Reverse Integer  Total Accepted: 17472 Total Submissions: 43938 Reverse digits of an integer. Example1: x = 123, return 32...
分类:其他好文   时间:2014-05-14 00:59:13    阅读次数:369
[LeetCode]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".Clarification:What constitu...
分类:其他好文   时间:2014-05-13 22:45:04    阅读次数:317
[LeetCode]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 expr...
分类:其他好文   时间:2014-05-13 22:43:01    阅读次数:335
(求通俗易懂的证法) 过n个有标志顶点的树的数目等于n^(n-2)
最近一段时间是决定好好把算法大体学一遍了。今天发现了一个有趣的定理:cayley’s theorem: 过n个有标志顶点的树的数目等于n^(n-2)。以4个nodes的树为例,应该是16个没错,然后找了好半天也没有找到能看懂的证明过程。如果有哪位有发现比较易懂的证法,欢迎和我在留言讨论。:)
分类:其他好文   时间:2014-05-13 18:25:06    阅读次数:183
Django中url的逆向解析 -> Reverse resolution of URLs
之前的一篇文章中介绍了url的基本用法...
分类:其他好文   时间:2014-05-12 06:41:30    阅读次数:246
【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...
分类:其他好文   时间:2014-05-11 18:15:52    阅读次数:300
【LeetCode】Reverse Linked List II
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...
分类:其他好文   时间:2014-05-11 16:03:43    阅读次数:327
Leetcode: Swap Nodes in Pairs
坑爹地多次过,全都是写程序时不注意的小问题,书写习惯还需要进一步改善。遇到的bug有:忘记return语句;定义ListNode runner = head.next,却将判断head==null的情况放在这句之后; 忘记了新的head将不会是原来的那个head,而是head.next;所以以后遇到...
分类:其他好文   时间:2014-05-10 06:59:37    阅读次数:320
LeetCode--Reverse Integer
//#include #include #include //using namespace std; //const int MAXN=10; //int Stack[MAXN]; stack s; class Solution { public: int getNumber(int x) { //int lengthOfStack=0;...
分类:其他好文   时间:2014-05-10 04:45:29    阅读次数:231
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!