title: Algorithm for Shortest Path with a contraint, BFS or DFS
body: <p>Question stated as follow:</p>
  
  <blockquote>
    <p>Given a map which has some obstacles in it. Given a starting point S
    and ending point E, find the shortest path from S to E. Note you can
    choose any(4) direction from S, but during the process, you can only
    go straight from the previous direction, unless you hit an obstacle.</p>
  </blockquote>
  
  <p>I am confused with this constraint, but during the process, you can only</p>
  
  <blockquote>
    <p>go straight from the previous direction, unless you hit an obstacle.</p>
  </blockquote>
  
  <p>Does that mean straightforward BFS won't be able to solve this problem? Will a modified BFS or DFS be able to find a solution for this?</p>
  
  <p>Claim: I am looking for a solution, just some hints or thoughts.</p>