首页 > 其他 > 详细

【leetcode_easy_array】989. Add to Array-Form of Integer

时间:2020-07-09 22:43:15      阅读:66      评论:0      收藏:0      [点我收藏+]

problem

989. Add to Array-Form of Integer

solution

 

复杂度分析

时间复杂度

空间复杂度

 

注意点:

1. 数组的长度 和 非负整数的长度都需要考虑到;

2. 用到vector的几个函数,比如empty/ pop_back/ push_back/ reserve;

3. 非负整数的余数和进位的表示;

4. 可以将非负整数看做是进位数值(Good idea!!!);

 

参考

1. 989. Add to Array-Form of Integer

2. cplusplus_std::reverse;

【leetcode_easy_array】989. Add to Array-Form of Integer

原文:https://www.cnblogs.com/happyamyhope/p/13266886.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!