title: How to compute the running time of A-star algorithm
body: <p>I am working with A* algorithm. I have a 2D grid, with some obstacles, and given the starting and final position, I find the shortest path between them.</p>
  
  <p>Here's my pseudocode</p>
  
  <pre><code>while(queueNotEmpty){
    removeFromPQ;
    if(removed == destination)
      found;
    insertAllNeighbours;
  }
  </code></pre>
  
  <p>Remove and insert are the function on priority queue(Heap), and is O(log(n)) time.</p>
  
  <p>Considering the dimension of grid as N*N. How do I calculate the running time. i.e how many times will this loop execute? Is there any measure?</p>