Write an algorithm that takes in categorized data and classifies a given set of travelers as
“Infected”, “NotInfected” or “Unknown”.
The input comprises of a string containing two parts separated by ‘#’. The first part contains
categorized data for any number of individuals separated by comma. Data for each individual
contains space separated three values as follows:
The second part contains space separated temperature and blood pressure of multiple travelers
separated by comma.
Categorization of travelers separated by comma.
Did you understand the question? Please give some explanation, I’m still unable to get it. Is the output category of the people whose temperature and blood pressure are mentioned after # in the input string as per the input before #?
Airport authorities around the world are struggling to contain the outbreak of a deadly virus.
They want to categorize travelers as “Infected” or “NotInfected” on arrival and have sought
instructions for identifying the same. Research scientists have determined that an infected
person exhibits ‘body temperature’ in a given range and ‘blood pressure’ in a given range. They
have provided these two ranges along with additional categorized data which contains
temperature and blood pressure measurements for a set of people and their classification.
Unfortunately the ranges for temperature and blood pressure were lost due to transmission
error. On careful thought the airport authorities have determined that they can still use the
categorized data to classify new travelers. Unfortunately they will not be able to determine the
infected status in all cases. They have decided to mark such cases as “Unknown”