Suppose we want to run Dijkstra's algorithm on a graph whose edge weights are integers in the
range `{1,2,...,W}`, where W is a relatively small number. How to find the shortest path from vertex `s` to `t` in `O((|V|+|E|)logW)`?

I encountered this problem from the book Algorithms by S. Dasgupta, C. Papadimitriou and U. Vazirani. I could prove that if we implement the Dijkstra's algorithm as before, at each iteration the range of the distances for nodes in the priority queue would be within `W`. However, since priority queues do not have the property to put elements with same weights into the same bucket, this observation does not directly lead to a solution to the problem.

Could anyone give me some hints on how to go one step further to make the bounded range `W` work for me?

Thanks!