Hi,
I'm trying to solve Magical Bridges.
This is my code : ideone.com/MQPa0s
I'm solving it with Floyd Warshall algorithm. I'm passing the test cases.
I've even tested my algo for like 100 other test cases. It is still showing wrong answer.
Can anyone have a look at it please ?