C++ Code for The Relationship (TCS Codevita) | PrepInsta

The Relationship

TCS CodeVita is a coding competition organized by TCS every year, in search of world’s best coder. This is a global level coding competition in which coders from all around the world compete for the title of World’s Best Coder. The Relationship is one of the sample problem of this year TCS CodeVita season 11 competition. 

tcs-bps-hiring

Question -: The people of Kingdoms of Westeros are very organized. They are very devoted to their leader and cannot live without a leader even for a single day. Marriages, divorces, births, and deaths are everyday things in Westeros and because of these events people of Westeros need to spend their time on choosing the leader. People badly need a programme to find the new leader in case of these events. The criteria to choose the leader is as below.