why getting seg fault
Count binary substring
hello @dakshi
your code is correct.
a) changed datatype of dp array to long long. and function return type to long long.
b) declared static dp array. some server issue is there ,on dynamic allocation it is giving run error.