码迷,mamicode.com
首页 >  
搜索关键字:plus-one    ( 245个结果
[LeetCode] Plus One Linked List 链表加一运算
Given a non-negative number represented as a singly linked list of digits, plus one to the number. The digits are stored such that the most significan ...
分类:其他好文   时间:2016-06-29 13:05:58    阅读次数:148
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-06-24 23:39:28    阅读次数:190
2016.6.20——Plus One
Plus One 本题收获 1.vector<int> 和vector<char>的区别,及与int转换 从vector<int> nums 转换为int res型,直接for循环 res += nums[i];(nums中的数本就是int型,不需要再-‘0’,char型则需要用nums[i] 的A ...
分类:其他好文   时间:2016-06-20 18:29:03    阅读次数:184
笔试题79. LeetCode OJ (66)
Plus One     首先解释一下这个题的意思:一个非负数的内容从高位到低位(十进制位)依次放到数组的每一位,例如:123,存放到数组中就是[1,2,3],现在将这个数加 1 ,返回加1后的结果,如[1,2,3]应该返回[1,2,4].     弄清楚了题意以后解题就变得简单了,这个题的思路是从最低位开始,将它加1,若产生进位就依次往高位处理进位,直到没有进位为止。    有一点需要注意...
分类:其他好文   时间:2016-06-18 15:36:56    阅读次数:140
66. Plus One
1. 问题描述 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 di ...
分类:其他好文   时间:2016-06-15 23:36:02    阅读次数:121
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-06-14 08:51:28    阅读次数:116
leetcode 之Plus One(9)
这题需要注意的是最后的进位 vector<int> plusOne(vector<int>& nums,int num) { add(nums, num); } void add(vector<int> &nums, int num) { int c = num; for (auto it = nu ...
分类:其他好文   时间:2016-05-16 14:27:19    阅读次数:123
LeetCode-Plus One
这道题考察数字进位,注意考虑溢出情况。 ...
分类:其他好文   时间:2016-05-04 06:36:19    阅读次数:96
66. Plus One Java solutions
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-05-03 16:01:40    阅读次数:162
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-28 12:19:23    阅读次数:160
245条   上一页 1 ... 8 9 10 11 12 ... 25 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!