码迷,mamicode.com
首页 >  
搜索关键字:plus-one    ( 245个结果
leetcode 66. 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 a ...
分类:其他好文   时间:2016-04-17 00:29:59    阅读次数:185
66. 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 a ...
分类:其他好文   时间:2016-04-11 00:11:20    阅读次数:123
Leet Code OJ 66. Plus One [Difficulty: Easy]
题目: 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.翻译: 给定一个非负数,它是有数字的数组组成,...
分类:其他好文   时间:2016-03-04 17:48:32    阅读次数:126
Leetcode 66 Plus One STL
题意让大数加1 我的做法是先让个位+1,再倒置digits,然后进位,最后倒置digits,得到答案。 1 class Solution { 2 public: 3 vector<int> plusOne(vector<int> &digits) { 4 digits[digits.size() -
分类:其他好文   时间:2016-03-02 23:25:29    阅读次数:178
66. Plus One
这道题没什么难度,但是之前看到过一种方法写得很好看。 因为这道题不是加上一位数,是加1,所以只有两种情况: 1. 该位是9,所以变成0,循环继续 2. 该位不是9,那就这位+1,然后返回 如果进行完了循环仍没有返回,说明整个数都是999999,那么就需要补一位,并且这个数是类似于100000...这
分类:其他好文   时间:2016-02-29 10:35:17    阅读次数:131
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 i
分类:其他好文   时间:2016-02-05 01:12:00    阅读次数:279
Java [Leetcode 66]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 ...
分类:编程语言   时间:2016-01-22 00:04:33    阅读次数:213
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 ...
分类:其他好文   时间:2016-01-05 13:59:28    阅读次数:180
LeetCode 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...
分类:其他好文   时间:2015-12-21 15:41:48    阅读次数:121
【数组处理】66
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...
分类:编程语言   时间:2015-12-17 12:54:15    阅读次数:146
245条   上一页 1 ... 9 10 11 12 13 ... 25 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!