i dont know how to handle for negative integers pls tell me what is wrong in code
link to code is https://ide.codingblocks.com/s/121572
Min money neede
there is no need to handle negative integer because constraints are
1 <= N,W,val[ ] <= 10^3
sir then pls optimise my code how to handle themm pls comment out the changes