Help with explanation

problem: I’m not able to understand why to use such a complex solution instead of using dp
In the solution they are solving using set

hello @raghav007

they are just using dijkastra which is very common algorithm for shortest path problems.
how u can solve it with dp? here u can move in all four directions

ohh okay but is it possible to use recursion in this type of problem

code: https://ide.codingblocks.com/s/479830

code is showing error on leetcode: https://leetcode.com/problems/path-with-minimum-effort/

you can use bactracking

pls dont post doubts of other platform’s course here.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.