1. MUDREX On-Campus OA (2023) | Count of Matches in Tournament

Question · Posted Jun 2026

Q1: Count of Matches in Tournament Problem Statement There are n teams participating in a tournament. If the current number of teams is even, exactly n/2 matches are played and n/2 teams advance. If the current number of teams is odd, (n-1)/2 matches are played, one team gets a bye, and the remaining teams advance. Return the total number of matches played until a single winner remains. Example Input n = 7 Output 6 Constraints 2 ≤ n ≤ 200

The full answer & interview discussion are available to premium members.

Log in Create a free account