Minimum Security Clearance Level for Graph Traversal
Given a directed graph where each edge has an associated security clearance level, find the minimum security clearance level required to travel from a source node to a destination node. As a follow-up, extend the solution to also account for edge weights and find the shortest path while minimizing the required security clearance level.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late August, 2026
We are given a list of nodes of a graph and a list of edges. Each edge has a minimum security associated with it. You can go from edge1 to edge2 only if your security level is greater than or equal to the security level of the edge. You are also given the source and the destination nodes. You need to find out the minimum security level needed to go from source to destination. Eg- nodes = [1,2,3,4] edges 1 --> 2 | 3 1 --> 3 | 2 3 --> 4 | 3 2 --> 4 | 5 Expected output is 3. The question was followed up with what happens when we are also given the weights of the edge as well and we need to find the shortest path to get from source to destination with the least possible security level.
Hello Interview Premium
Your account is free and you can post anonymously if you choose.