Company: Autodesk_10april
Difficulty: medium
Team Competition Ranking Problem Description Consider a competition that uses a point system to determine the team rankings. After a match, the winning team receives 3 points, the losing team receives 0 points, or, if tied, both teams receive 1 point. The team that accumulates the most points wins the competition. However, if there is a tie, the team with the highest goal difference among the tied teams is the winner. Goal difference is calculated as scored - conceded goals. You are given 4 arrays of the same length wins , draws , scored , and conceded . Within each array, the i -th element represents the corresponding metric for the i -th team (i.e., goals scored scored[i] , goals conceded conceded[i] , matches won wins[i] , and matches tied draws[i] during the competition (for each i in 0, 1, ..., wins.length - 1 ). Your task is to determine the indices of the winning team and the team in second place. Return an array of exactly two integers, where the first is the index of the winni