Faced this variation of standard problem in an interview:
Given a 2-D grid ( assume in the first quadrant of X-Y plane) , we have to move from ( 0,0) to (N,N). We have 3 moves allowed- up, right, down.
Also, assume that in a particular path, no cell is repeated. ( So that there is no path of infinite length ). We can solve this using DFS.

However, Is there any DP solution for this ?

  • created

    Aug '11
  • last reply

    Aug '11
  • 1

    reply

  • 273

    views

  • 2

    users

Suggested Topics

Topic Category Replies Views Activity
Off-topic 1 129 Apr 9

Want to read more? Browse other topics in Off-topic or view latest topics.