Run error in 2 testcases

getting Run errror in some testcases. I think solution is completelt fine

Hey @sohampatil_sp
Please send your code so that I can check it


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.