码迷,mamicode.com
首页 >  
搜索关键字:non-negative    ( 2271个结果
LeetCode Algorithm 02
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 ...
分类:其他好文   时间:2015-03-21 19:53:11    阅读次数:151
leetcode3--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-03-21 15:39:18    阅读次数:118
[LeetCode] Rotate List 旋转链表
Given a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->NULL.这道旋转链...
分类:其他好文   时间:2015-03-21 15:20:25    阅读次数:141
[LeetCode]Rotate List
Given a list, rotate the list to the right by k places, where k is non-negative. For example: Given 1->2->3->4->5->NULL and k = 2, return 4->5->1->2->3->NULL. 这道题是要求将单链表循环右移k次,每次...
分类:其他好文   时间:2015-03-20 23:53:07    阅读次数:287
【LeetCode】 Rotate List 循环链表
题目:rotate list 解法1: /**LeetCode Rotate List:Given a list, rotate the list to the right by k places, where k is non-negative. * 题目:循环移动链表,等价于将链表从右边数的k个节点移动到表的前方 * 思路:移动倒是简单,重点是要找到链表倒数的k个数,就等价于找到倒数第...
分类:其他好文   时间:2015-03-20 14:28:55    阅读次数:134
Plus One
Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is at the head of the list. vector plusOne(vector &d...
分类:其他好文   时间:2015-03-20 10:58:09    阅读次数:136
UVA 10655 Contemplation! Algebra(矩阵快速幂)
Given the value of a+b and ab you will have to find the value of an+bn   Input The input file contains several lines of inputs. Each line except the last line contains 3 non-negative integers p, q...
分类:其他好文   时间:2015-03-20 00:01:31    阅读次数:450
LeetCode --- 66. Plus One
题目链接:Plus One Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is at the head of the list. 这道题的要求是给定...
分类:其他好文   时间:2015-03-19 21:59:35    阅读次数:117
[LeetCode]Largest Number
题目描述: Largest Number Given a list of non negative integers, arrange them such that they form the largest number. For example, given [3, 30, 34, 5, 9],...
分类:其他好文   时间:2015-03-19 20:04:12    阅读次数:129
Largest Number
Largest Number问题:Given a list of non negative integers, arrange them such that they form the largest number.For example, given[3, 30, 34, 5, 9], the l...
分类:其他好文   时间:2015-03-19 14:41:16    阅读次数:127
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!