That test is using different values for del_cost, ins_cost, and rep_cost, and I think that’s what causing the problem. However, I don’t see any error in my code. I’m using the correct variables to pass the values of del_cost, ins_cost, and rep_cost.
Ensure that you are correctly implementing and using these costs in your distance matrix calculations. Double-check that you are passing the correct variables and that the logic properly uses del_cost, ins_cost, and rep_cost at each step by debugging and printing intermediate values!
If everything appears correct and the problem persists, you can send your code in PV so we can check it out.
Thank you for your answer. I have checked my code and debugged it as best as I could, but I still don’t see where the issue might be. I’d like to send you my code in PV (what does PV stand for?). What do I have to do to send it that way?
Hi @Alireza_Saei! Sorry I was slow to respond. I looked at the post shared by Deepti_Prasad and I was able to identify the bug I had in my code. I wasn’t initializing row 0 and col 0 correctly.
Hi @Deepti_Prasad! The issue described in the post you shared was exactly the bug I had! I have fixed it and now I’m able to pass all the tests. Thank you very much!