Codechef ⤐ practice(easy) ⤏ reverse ⇛ Chef and Reversing

simple problem on finding shortest path between a pair of vertices.

Just add an inverted edge to every directed edge with weight 1 if that doesn’t have one and calculate the shortest path between the given two vertices.

https://gist.github.com/603dd596dd77bca153cb

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s