The problem is to find the shortest distance in a weighted graph, where the weight of each edge is non-negative and it is given that the weight of each edge is less than a constant C. For example, C = 500.
I know that I can solve this problem using Dijkstra, however, the time complexity would be high. The problem should be solved in linear time in terms of the vertices and edges of the graph.
I think this has to do with some linear graph traversal, BFS or DFS
A direction would be appreciated on how to solve this problem in linear time.