Company: Airtel_24sep
Difficulty: medium
Save the States Problem Description You are given a map of a country in the form of an acyclic graph with m nodes. Each node represents an individual state connected to each other through bidirectional roads. During a war, the enemy has occupied the country and placed 1 tank in each of the states mentioned in the input. The tanks use bidirectional roads to travel to any state. To save any two tanks reach the same state then, the state will be destroyed. You need to stop two tanks from entering into the same state, in order to do so, you need to eliminate (optimally) the roads connecting any two states in which the tanks are placed. You need to find the least amount of time required to eliminate the connecting roads. Eliminating each road will take a certain amount of time which is given in the input. Note: The number of states and tanks is always greater than 1. If there are m number of states, then they are numbered from 0 to m-1, i.e, state₀, state₁, up to stateₘ₋₁. The time required