title: How to get the minimum element from a priority queue after modifying the contents of queue
body: <p>I was trying to implement Dijkstra's algorithm using a <code>priority queue</code> in Java..
  Unfortunately it was returning wrong results...I have tracked down the problem.
  Here's the Problem..After inserting the node weights into the queue,I am modifying those node weight,but when i try to remove the element from the priority queue ,its returning the historical minimum (minimum at the time of insertion).<code>remove()</code> doesn't know that the priority queue has been modified..Any help would be greatly appreciated ...Thanks!</p>
  
  <p>Note:i can add the source code if required</p>