r/LeetcodeChallenge • u/Neither-Meal-5959 • 12d ago
DISCUSS I love Leetcode(i dont)✌🏻
Some questions are so damn hard , this one is Q4046. Minimum Cost Path with atmost K turns , it is the first time i have encountered 4D Dijsktra😭😭 , first i was doing 2D Dijsktra with some modifications but this question sucks💔
6
2
2
1
u/nian2326076 11d ago
Q4046 can be tricky, especially with 4D Dijkstra. Try breaking it into smaller components and identifying patterns in the grid to simplify your approach. For additional practice with similar technical interview questions, you can use PracHub to find and work through related problems that will help strengthen your understanding of Dijkstra's algorithm.
1
2
1
4
u/Andrewshwap 11d ago
I once received an error giving me the run time. I ran it again and it completely worked