Critical Connections
Get started
জয় শ্রী রাম
🕉Problem Statment: We have network of servers which are connected by bidirectional server-to-server connections forming a network. Any server can reach any other server directly or indirectly through other servers.
A critical connection is a connection that will make some server unable to reach some other servers if the connection is removed.
Return all critical connections in the network in any order.
Example:
2 /| / | / | 1 | | \ | | \| | 0 | 3
Input: Total number of servers = 4, connections = [[0,1],[1,2],[1,3],[2,0]]
Output: [[1,3]] OR [[3,1]]
Solution:
Algorithm:
Login to Access Content
Java code:
Login to Access Content
Python code:
Login to Access Content
Don't forget to take a look at other interesting Graph Problems:
- How to Send Message to Entire Social Network
- Disconnected Network
- Minimal Vertices
- Course Scheduling