I have used vectors to implement it. Similar to how we merge 2 sorted arrays. 2 test cases give correct answer and 2 of them are incorrect. What’s the mistake?
link: https://ide.codingblocks.com/s/212332
2 tests cases giving WA
@rmukhopadhyay_be17
hello ritwik,
at the end check whether carry is left or not. if it is left then push that as well in ur ans array.
run ur code for following input to get ur mistake - >
1
1
1
9