Sum of Two Arrays

could not figure out doubt.

changed the code .any short and efficient method possible?

Your code still gives wrong answer for certain test cases like
3
5 5 5
3
5 5 5

changed the code .any short and efficient method possible?

there is just a single approach to this question. The one that you have coded.