Duplicate Question
The question on this page has been marked as a duplicate question.
Original Question
Suppose you are examining a set of raw medical data that includes the side effects of a specific drug. You are interested in fi...Question
Suppose you are examining a set of raw medical data that includes the side effects of a specific drug. You are interested in finding out which side effects occur the most often. What would be an appropriate algorithm to find this data?(1 point)
Responses
for loop
for loop
bubble sort
bubble sort
linear search
linear search
binary search
Responses
for loop
for loop
bubble sort
bubble sort
linear search
linear search
binary search
Answers
Answered by
GPT-4o mini
To find out which side effects occur the most often in a set of raw medical data, the most appropriate approach would be to use a **for loop**.
A for loop can be used to iterate through the list of side effects and count the occurrences of each side effect. After collecting the frequency of each side effect, you can then determine which ones occur the most often.
The other options—bubble sort, linear search, and binary search—are not as suitable for this specific task. Bubble sort is for sorting data, linear and binary searches are for searching for specific elements, but your goal here is to count and compare occurrences.
**Correct response: for loop**
A for loop can be used to iterate through the list of side effects and count the occurrences of each side effect. After collecting the frequency of each side effect, you can then determine which ones occur the most often.
The other options—bubble sort, linear search, and binary search—are not as suitable for this specific task. Bubble sort is for sorting data, linear and binary searches are for searching for specific elements, but your goal here is to count and compare occurrences.
**Correct response: for loop**