Company: Flipkart_13july
Difficulty: medium
Cheapest Path to Visit Shortlisted Places Problem Description In the city of Atlanta, Perce is planning to visit some memorable places. The city has N places that she wants to visit. These places are connected by paths on which buses with fixed ticket prices travel people from one place to another. There may be multiple paths between two places and the ticket prices are for a round trip. So, even if she wants to buy a ticket for a one way trip, she has to pay for a round trip and this makes the trip a bit expensive. Being on a tight budget, she wants to find a cheap way to visit the places. Looking at the ticket prices, she soon realizes that she would not be able to visit all the N places. So she decides as a first step to eliminate from her list all those places which are at distinct corners of the city or places connected only by paths which if eliminated, divides the trip into 2 unconnected parts. Then, to visit the shortened list of places that remained, she would take the cheapes