am i supposed to do matrix addition did not understand the question to frame the logic
💡 Arrays-Sum Of Two Arrays
Hi @Pradeep, You are supposed to take matrix as number and index as positions … example your array is arr={1,2,3,4,8} and arr2={4,3,7,9,1} so it will be number 12348+43791 … you have to add 1 at arr2[4]+8 at arr[4] … But remember that array can have different sizes . it is not necessary that 4th element of arr2 will be at correct position to be added to 4th element of arr.
but according to sample input given if we add array[4] with array2[4] it gets to 16 but answer here is just 6 how is that possible same with array[3] and array2[3] as well it end up giving 8 but sample utput is 9
the carry 1 of 16 will be transfered to array index 3 which will make 8 as 9… like int normal addition we used to transfer carry
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.