Laser Tag Question. How to solve

Code Nation Fresher’s batch has a tradition of laser tag tournaments n laser tag, two teams play against each other. A team can have any number of players 1. The two teams can have unequal team members

For successful completion of this tournament. Ipshita four HR wants that every person must have played against every other person, as part of different teams. Every Laser tag match takes 30 minutes to complete. Now the gaming arena has allowed Codenation to play for a maximum of Hours after which the area closes. Given the number of folks in the batch as N, you will have to find out if Codenation will be able to finish the tournament before the complex closes?

Note: Please return output as 0 or 1.1 means tournament will successfully complete, O otherwise

@rachitbansal2500 it’s simply log2(N)<=2*x
just try for few values and you will see the relation!

How did you derive this relation? Also how can we understand how many matches are to be played(min)?

@mayankA47 can you put a few values and explain

Take for N=2, matches needed = 1
for N=3,4 matches = 2
for N = 5,6,7,8 matches = 3
and so on, so ceil(logN) gives minimum matches needed.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.