+ 2

Can anyone help me optimize my code for the 2D Map Problem?

This is my link: https://code.sololearn.com/c8m5Z0gvma35/?ref=app In my code, I'm using the Breath-First-Search pattern for the path-finding algorithm. This is the resource that I'm using: https://www.geeksforgeeks.org/shortest-distance-two-cells-matrix-grid/ So far all of my tests have been corrected except for test 5, which I don't know why. I would be very grateful if anyone can help me with this.

10th Dec 2022, 7:40 AM
Nguyễn Hoàng Dũng
Nguyễn Hoàng Dũng - avatar
2 Respostas
+ 7
I can't click link to your code. Are you using old version of sololearn?
10th Dec 2022, 8:33 AM
Sadaam Linux
Sadaam Linux - avatar
0
Ah sorry, here is the new link. https://code.sololearn.com/c8m5Z0gvma35/?ref=app
10th Dec 2022, 8:38 AM
Nguyễn Hoàng Dũng
Nguyễn Hoàng Dũng - avatar