Giving WA in 3 test case

code- https://ide.codingblocks.com/s/388577

@anubhavb0011, check this test case
9 (size of array)
1
2
3
4
0
0
0
8
0
your code output is : 1 2 3 0 0 0 4 0 0
which is incorrect as correct answer should be : 1 2 3 4 8 0 0 0 0

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.