Plus One | LeetCode 66 | Add One to Number Represented as Array | Programming Tutorials

preview_player
Показать описание
In this tutorial, I have explained plus one LeetCode solution and it's java code with examples. Add One to number represented as array.


Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the most significant digit is at the head of the list, and each element in the array contain a single digit.

You may assume the integer does not contain any leading zero, except the number 0 itself.

LeetCode July Challenge Day 6.

Рекомендации по теме
Комментарии
Автор

Great job, but you are not covering 8999 case.

vensaba
Автор

for edge case scenario {9, 9, 9} .... it gives result 0, 0, 0

gauravkumar-hjpj
Автор

{9, 9, 9}---->it shows 0, 0, 0 input please check sir i am not getting it

shubhamgupta