Marks :10
: 2 | : 0
You are given two numbers represented as integer arrays $$$a$$$ and $$$b$$$, where each digit is an element.
You have to return an array that represents the sum of the two given numbers.
The last element denotes the least significant bit, and the first element denotes the most significant bit.
Constraints
1 <= |a|, |b| <= 10$$$^5$$$
0 <= $$$a_i$$$, $$$b_i$$$ <= 9
The first line contains two integers $$$n$$$ and $$$m$$$ — the length of the arrays $$$a$$$ and $$$b$$$, respectively.
The second line of each test case contains $$$n$$$ integers $$$a_1$$$,$$$a_2$$$,…,$$$a_n$$$.
The third line of each test case contains $$$m$$$ integers $$$b_1$$$,$$$b_2$$$,…,$$$b_m$$$
You need to output the array representing the sum of the given two arrays $$$a$$$ and $$$b$$$.
3 3 1 2 3 2 5 5
3 7 8
4 5 1 3 4 6 2 4 1 7 4
2 5 5 2 0
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.