Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Add to Array-Form of Integer (Easy 989)

Given the array-form A of a non-negative integer X, return the array-form of the integer X+K.

Solution:

Click here Reverse array, and treat K as carry, and add digit by digit. Extend array if needed. O(n) time, O(n) space.



Installation

Run make to run python and Swift files.