What is the space complexity of Dijkstra Algorithm?
Dijkstra's algorithm can be implemented in many different ways, leading to resource usage. The page you link gives the resource usage the implementations in the specific library being described.

I can't think of a way of implementing Dijkstra to use $|V|^2$ space, but I would note two things.


$O(\cdot)$ only gives an upper bound. Even if the implementation actually uses space $O(|V|)$, it's not wrong to say that it uses $O(|V|^2)$ or even $O(2^{|V|})$, just as it's not wrong to say that I earn less than a billion dollars a year. However, it would be unusual to say $O(|V|^2)$ if it was easy to prove the stronger bound of $O(|V|)$ (I also earn less than a million dollars a year), and it is easy to prove $O(|V|)$ for most implementations of Dijkstra.
The page quotes the running time as $O(s|E|\log|E|+V)$, where $s$&nbsp;is the number of sources being considered. It's easy to imagine space usage of $O(s|V|)$ so maybe they wrote $O(|V|^2)$ since $s\leq|V|$.  But that would also be strange, given that the quoted running time shows they're not afraid to use&nbsp;$s$.