only one test case is passing.Why?
Can you tell me why there is TLE in all cases except one
u need to use Dynamic Programming since the constraints are large
I used dynamic programming but still the code is not working
i see a recursive code in ur submission
send code in cb ide

memset can assign -1 , 0 , 1 only
syntax is wrong
memset( dyn , valueTObe asgined , sizeof(dyn))
but still its not passing the test cases
added comments
thanku so much,the code passed all the test cases
1 Like