Публикации по теме 'add-one'


Решение в JS. Добавить один
Уровень - Легкий Нам задают этот вопрос. You are given a list of integers nums , representing a decimal number and nums[i] is between [0, 9] . For example, [1, 3, 9] represents the number 139 . Return the same list in the same representation except modified so that 1 is added to the number. Constraints n ≤ 100,000 where n is the length of nums . Нам дано число = [1,3,9], и мы хотим, чтобы ответ был [1,4,0]. Этот вопрос кажется прямым. Мой первоначальный подход..