Help with error

code: https://ide.codingblocks.com/s/422967 2

prob: https://hack.codingblocks.com/app/contests/2022/243/problem 2

I referred to this video and tried to implement their solution

which video you are refering?

what is your approach to solve this problem


this one

the approach you have tried is not correct
you are adding head->data of both the list

suppose lists are
1 2 3
6 7 8 9 4

you are adding 1 and 6 which is wrong
you have to add 4 with 3, 1 with 8
like normal addtion

Correct approach