(self)
| 47 | |
| 48 | #function to call helper function with initial inputs |
| 49 | def bridge(self): |
| 50 | |
| 51 | visited = [False] * (self.V) |
| 52 | disc = [float("Inf")] * (self.V) |
| 53 | low = [float("Inf")] * (self.V) |
| 54 | parent = [-1] * (self.V) |
| 55 | |
| 56 | for i in range(self.V): |
| 57 | if visited[i] == False: |
| 58 | self.bridgeUtil(i,visited,parent,low,disc) |
| 59 | |
| 60 | #path function returns parent array |
| 61 | #this function uses dfs for finding the path |