Help me out in this

@aa are u there kindly resolve it?

yes let me go through your code

@aa okay sure have a look

@aa1 you got the logic?

yeah ,you need to handle the cases when sum can be negative for mod
also initialize m[0]=1 to start sum