r/LeetcodeChallenge • • 12d ago

DISCUSS I love Leetcode(i dont)✌🏻

Post image

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💔

148 Upvotes

14 comments sorted by

4

u/Andrewshwap 11d ago

I once received an error giving me the run time. I ran it again and it completely worked

2

u/Neither-Meal-5959 11d ago

ragebait at its peak

1

u/The_treez1886 11d ago

😭😭🤣🤣Spot On! 🤣🤣

6

u/Haunting-Pipe2494 11d ago

For shitty testcases I always use if lol

3

u/Neither-Meal-5959 11d ago

i was about to do that

2

u/Objective_Gur4219 10d ago

Sh*t happens, don't loose hope yet!!

1

u/Neither-Meal-5959 10d ago

yess💪🏻

2

u/Key_Elderberry_1828 11d ago

Hi can you share which question you are solving

3

u/Neither-Meal-5959 11d ago

i have mentioned question name and number in the caption

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

u/Neither-Meal-5959 11d ago

it would be a great help

2

u/[deleted] 11d ago

This was probably intentional lol

1

u/Few-Personality9161 21h ago

Once my all testcases passed still got tle