Company: Sap_labs_13dec
Difficulty: medium
Tournament Winner Tournament Winner Description There are N players (numbered from 0 to N-1 ) participating in a tournament. The K -th player's skill level is given by skills[K] . It is guaranteed that no two players have the same skill level. The tournament is played in rounds as long as there are at least two players remaining. A single round of the tournament consists of one or more matches. The rules are as follows: In a match, two players compete against each other. The player with the higher skill level wins the match. The loser is eliminated, and the winner advances to the next round. In the first round, player 0 faces player 1, player 2 faces player 3, and so on. In subsequent rounds, the winners are paired up in the same manner. For example, in the second round, the winner of the match between players 0 and 1 faces the winner of the match between players 2 and 3. This process continues until only one player, the tournament winner, remains. Given the array of player skills, ret