Bottom up approach in grid problem

Here’s my code, it’s all fine except the bottomUp approach in function minCostBU…what could be the error in my approach.
Link to the code: