Skip to content

How we are handling -ve values by sum of mod value 10^9+7. #3

@abhik235

Description

@abhik235

if(sum < 0) {
sum = sum + mod;
}

I didn't get this part. However -ve value is also possible then if we add 10^9+7 it will become +ve which is wrong. Please clarify this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions