Graph = > 1 -- -- 2 -- -- 3 -- -- 4 | | 5 -- -- 6
for i in range ( N ) : NEW_LINE INDENT v . append ( [ ] ) NEW_LINE DEDENT for i in range ( N ) : NEW_LINE INDENT g . append ( [ ] ) NEW_LINE DEDENT v [ 1 ] . append ( 2 ) NEW_LINE v [ 2 ] . append ( 1 ) NEW_LINE v [ 2 ] . append ( 3 ) NEW_LINE v [ 3 ] . append ( 2 ) NEW_LINE v [ 2 ] . append ( 5 ) NEW_LINE v [ 5 ] . append ( 2 ) NEW_LINE v [ 5 ] . append ( 6 ) NEW_LINE v [ 6 ] . append ( 5 ) NEW_LINE v [ 6 ] . append ( 3 ) NEW_LINE v [ 3 ] . append ( 6 ) NEW_LINE v [ 3 ] . append ( 4 ) NEW_LINE v [ 4 ] . append ( 4 ) NEW_LINE ans = findMaxBridges ( ) NEW_LINE print ( ans ) NEW_LINE