Algorithm to categorize data

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.

Sample Input & Output
90 120 Infected,90 150 NotInfected,100 140 Infected,80 130 NotInfected#95 125,95 145,75 160 Infected,Unknown,NotInfected
80 120 Infected,70 145 Infected,90 100 Infected,80 150 NotInfected,80 80 NotInfected,100 120 NotInfected#120 148,75 148,60 90 NotInfected,Unknown,UnknownF

Will you please elaborate your question some more, also put input and output in proper formats please. It’s tough to understand and interpret this manner.

I have image but unfortunately i cant paste it here…
please suggest some alternative

I’m using (just a tip) :wink:

1 Like

all please use this as reference

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 #?

whole question is like this .

Virus Outbreak
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”

Please check below detail