title: grid representing as graph
body: <p>I am thinking of a grid and suppose in the grid '#' represents that the way is blocked and '.'(dot without quotes) represents there is a way.So if A is inside the grid then he can walk inside when he found way(.)
   e.g.,</p>
  
  <pre><code>#######
  ##A####
  ##.#.##
  ##.#.##
  ##...##
  #######
  </code></pre>
  
  <p>for the above example, A found the way and he reaches to other place like this below in picture:</p>
  
  <pre><code>#######
  ##.####
  ##.#A##
  ##.#.##
  ##...##
  #######
  </code></pre>
  
  <p>If I am thinking this problem as a graph then How I will represent this grid as a graph ?
  How to represent this as an adjacency list ?
  I am new to graph just stuided BFS only, please answer in easy words</p>