r/LeetcodeChallenge • u/Neither-Meal-5959 • 5d 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💔
141
Upvotes
4
u/Andrewshwap 5d ago
I once received an error giving me the run time. I ran it again and it completely worked
6
u/Haunting-Pipe2494 5d ago
For shitty testcases I always use if lol
2
u/Objective_Gur4219 4d ago
Sh*t happens, don't loose hope yet!!
2
u/Key_Elderberry_1828 5d ago
Hi can you share which question you are solving
1
u/nian2326076 4d 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.
2
u/Ok-Commission-9518 5d ago
This was probably intentional lol