Node nextNode = null; while (!otherNodes.isEmpty()) { nextNode = extractMin(otherNodes); if (nextNode.vertex == target) { path = getPath(nextNode);
Node nextNode = null; while (!otherNodes.isEmpty()) { nextNode = extractMin(otherNodes); if (nextNode.vertex == target) { path = getPath(nextNode);