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

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;

posted on 2020-07-09 22:13  鹅要长大  阅读(101)  评论(0编辑  收藏  举报

导航