title: Most memory efficient algorithm for finding a path on a grid
body: <p>What is the most memory efficient algorithm that can be used to find a path from one grid square to another? The grid may have obstacles that cannot be crossed. Being the shortest path is not necessary, but certainly, is a bonus. The algorithm is going to be coded in C (C++ is available, but I am avoiding it to reduce memory usage) and run on an ATmega328 chip with only 2048 bytes of SRAM. CPU efficiency is not of paramount importance.</p>
  
  <p><strong>EDIT:</strong> The grid is 16 by 32 squares, each represented by one bit. The total memory usage is therefore 64 bytes. The grid is stored as a 2D array of unsigned chars and all of the 2048 bytes are available. The output would be an array of integers referencing the squares that should be taken.  </p>
  
  <p>If there is an obstacle in a square, the array of squares would have a 1 instead of a zero. These squares should be treated like walls.</p>