Company: Flipkart_4aug
Difficulty: medium
Sum of Anomaly Checkpoints Problem Description A marathon is being organised in the hilly terrains of Ladakh. Since the region is sparsely populated, care must be taken to ensure that no runner gets lost along the route. There are multiple checkpoints along the route, and expert checkpoint must connect to only one downstream checkpoint. However, since there were multiple teams working on setting up the checkpoints, there have been some mistakes, and there are some checkpoints which are connecting to more than one downstream checkpoints. The checkpoint details are given, with each checkpoint represented by a random integer. Write a program to identify the checkpoints which are connecting to more than one downstream checkpoints, and print their sum as the output. The route details are given as a list of relations between the Starting point and the checkpoints. The relations are indicated as L, R, LL, LR, and so on, where the checkpoint is to the left (L), or left-left (LL) or right-left