Let an undirected graph, $G=(V,E)$ with weights defined by the function $w:E\to\mathbb{N}$ and for each edge: $1\le w(e) \le |V|$. You are given two vertices: $s,t\in V$. Find a path from $s$ to $t$ where the maximum weight is minimal.
Basically I thought about utilizing DFS with a small modification:
We scan the graph from $s$ using DFS only we may add a vertex to the queue more than one time. We keep for each vertex a value $light[v]$. Now, consider a gray vertex, $v$ (meaning, a vertex which already scanned). Suppose there's an edge $\langle u,v\rangle$ such that $$w(u,v) < light[v]$$ then we update $light[v] = w(u,v)$ and insert $v$ to the queue once again.
I want to verify the correctness of my suggested algorithm. Also, is this linear? ($O(|V| +|E|$). I am not sure about that since basically each vertex could be added to the queue several times.