Time complexity of finding neighbors of specific nodes within a threshold in a weighted graph

97 Views Asked by At

Let $G$ be a weighted graph and the weights are in the range $[0,1]$. Consider the list $A=[a,b,c,d]$ as a list of nodes we want to find the neighbors of each within a specific threshold $T$. What is the time complexity to do that?

I have an answer for the question but I am not so sure about it. Using Dijkstra algorithm, my answer is $O(r(deg_{Avg})+r*log(|V|)$ where $r=Ceil(T/w)$ and $w$ is the average weight.