Amazon is working on creating a road network to connect all their warehouses to help in
transferring products between them. The proposed road network guarantees that all the
warehouses will be connected to each other directly or indirectly. A road can be classified as
"critical" or "non-critical". A road is considered "critical" if its removal results in a disconnected
network of warehouses. Amazon wants to significantly increase the efficiency of their
warehouse network by investing in better infrastructure to build those roads.
Write a method that returns the critical connections from the proposed connections.
Input
The input to the function/method consists of three arguments -
numotWarehouses, an integer representing the number of warehouses in the propos
numOfRoads, an integer representing the number of roads between the warehouses;
roads, a list of pairs of integers representing the roads between two warehouses.
Output
Return a list of integer pairs representing the critical connections. If there are no critical
connections, return a list with empty pair - not just an empty list.
Answers
Answered by
0
bi kuch idea nhi hai kya kra. app samjo an samhljo points ka mamla hau
Similar questions