getting Run errror in some testcases. I think solution is completelt fine
Run error in 2 testcases
here is the link to code
@sohampatil_sp
Max input size is 10^5
You have fixed your DP array rows to 1000
If your doubt is resolved please mark it as closed.