shlogg · Early preview
Md Ariful Haque @mah-shamim

Minimum Cost Walk In Weighted Graph

n vertices in an undirected weighted graph, find min cost walk between nodes si and ti using DSU and bitwise AND of edge weights.

3108. Minimum Cost Walk in Weighted Graph
Difficulty: Hard
Topics: Array, Bit Manipulation, Union Find, Graph
There is an undirected weighted graph with n vertices labeled from 0 to n - 1.
You are given the integer n and an array edges, where edges[i] = [ui, vi, wi] indicates that there is an edge between vertices ui and vi with a weight of wi.
A walk on a graph is a sequence of vertices and edges. The walk starts and ends with a vertex, and each edge connects the vertex that comes before it and the vertex that comes after it. It's important to note that a walk may visit the same edge or verte...