0
$\begingroup$

Imagine you have to solve this question (+ you have obstacles, i.e. walls), but you're allowed to move in any of 4 directions (not just 2: down and right). How can you solve it? I'm struggling to apply the same dynamic programming principle.

EDIT: one more similar question.

$\endgroup$
  • 1
    $\begingroup$ Can you include the relevant parts of the other questions in your post? $\endgroup$ – Yuval Filmus Jul 22 '18 at 6:54
  • $\begingroup$ What did you try? Where did you get stuck? We're happy to help you understand the concepts but just solving exercises for you is unlikely to achieve that. You might find this page helpful in improving your question. I'd suggest studying our resources on dynamic programming, try applying them on your own, and then edit your question to show your progress so far and what subproblem decompositions you've tried. $\endgroup$ – D.W. Jul 23 '18 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.