Why is this statement is required..?


#1

why is this statement important?
if (ans >= 1000000007) ans = ans - 1000000007

without it… fails for large test cases


#2

mod is working just fine
use on every iteration