Plus One
-
[LeetCode/Java] 66. Plus One - A0032022_PPS/2주차 2023. 1. 3. 21:08
- 문제 You are given a large integer represented as an integer array digits, where each digits[i] is the ith digit of the integer. The digits are ordered from most significant to least significant in left-to-right order. The large integer does not contain any leading 0's. Increment the large integer by one and return the resulting array of digits. - 알고리즘 만약 마지막 숫자가 9인 경우를 제외하고는 +1을 시켜준다. 9인경우, 그 전..