This code is stupidly long. lol. I am stuck on the case when we have to append the final carry to the last iteration. please edit the code or just tell me what to do?
Conceptual Doubt
u have done indexing mistake
Also u have sone for n>m twice
there is a simple logic
addition is done from the last number simplly in this case too
if 1 2 3 and 1 4 are aaray
then u go to the last element of both the array using index n-1 and m-1
and add them
if there addition id greater than 10 than a carry will appear then add it to the 1 index before to any array
if one of the array vanishes then simply the unfinish array elemets as it is act as front element of asn array
@phantom suppose n is the larger number 9768 and 9 has a carry of 1 , then how will it print 10 in the last iteration?
just print 10 if it is a last number because u didnt have to make a carry for a next time
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.