Asked by bobby

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

binary search
binary search

linear search
linear search

bubble sort

Answers

There are no human answers yet.
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** to iterate through the data and count the occurrences of each side effect. This would allow you to aggregate the data to find the most common side effects.

The other options you listed do not serve this purpose:
- **Binary search** is used for finding an item in a sorted list and is not applicable for counting occurrences.
- **Linear search** is for finding a specific value in a list, which is not the goal here.
- **Bubble sort** is a sorting algorithm, used to order elements, and does not directly help in counting occurrences.

So, the best choice to analyze the occurrences would be **for loop**.

Related Questions