-
-
Notifications
You must be signed in to change notification settings - Fork 740
Open
@Travelmind
Description
The while condition should add carry != 0, like this:
while( l1 != null || l2 != null || carry ==1){
}
otherwise, it cannot pass the test case like:
[9,9,9,9,9,9,9]
[9,9,9,9]
output should be:
[8,9,9,9,0,0,0,1]
but it missed the highest [1]
thx
Metadata
Metadata
Assignees
Labels
No labels