Company: Flipkart_13july
Difficulty: medium
PPE Distribution Network Problem Description A new virus is causing illness across the globe. Healthcare workers need to wear personal protective equipment (PPE) to save themselves from the virus, but there is a shortage of PPE across the country. To help get PPE to places where it is needed most, the Government has come up with a plan. All major cities have been classified into three types and a connectivity map has been prepared. Type A are the main cities; Type B are cities that are connected to Type A cities directly, and Type C are all the remaining cities. Type A cities are the most important for both economy and supply chain. They have a unique characteristic that if a Type A city gets locked down, then the map breaks down into two or more sub maps such that there is no connectivity between the two submaps. Because of this, all Type A cities were provided PPE on a war footing. Now it is the turn of Type B cities to get the PPE. Write a program to identify all the Type B cities,