Question: It s 2 0 2 4 and COVID is back again, the IPL organizing committee intends to use the unique player ID and smart card
Its and COVID is back again, the IPL organizing committee intends to use the unique player ID and smart card to
identify the whereabouts of their players within the secure Bio Bubble setup around the hotel and detect if there have been
any breaches. Whenever the player swipes his card in the hotel premises the player ID is recorded. When a player enters
the hotel for the first time, the counter is set to From then onwards, each time a player swipes out of the hotel premises
the counter is incremented, and incremented again when he enters back. If the counter is odd, it means the player is in the
hotel premises and if the counter is even, it means he is out of the premises.
The IPL organizing committee uses this data to perform the following analytics:
How many players are inside the biobubble setup today?
Number of players that have come today from net practice and are currently in the hotel?
Check specific player whereabouts?
List of players that have swiped in or out more than x number of times?
Which player ids within a range of IDs attended net practice, the swipe counter for them, and whether they are inside or
outside the hotel?
Requirements:
Implement the above problem statement in Python using BINARY TREE ADT.
Perform an analysis for the questions above and give the running time in terms of input size: n
QUESTION
def getSwipeRecself pNode: This function counts the total number of players who came to hotel today.
The output is entered in the outputPStxt file as shown below.
Total number of players recorded today: xx
Use a trigger function to call this recursive function from the root node.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
