Getting runerror

passed the sample test cases still getting runerror at the time of submisson.

have a look at my code at:

@rabhi1611 in your built_node function you are not considering the cases of c=1 and c=2 separately

It runs. Thanks a lot :slight_smile:

@rabhi1611 dont forget to mark your doubt as resolved!