1. 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?

Bubble sort
For loop
Binary search
Linear search

2.which of the following is a true statement

The only effort to consider regarding algorithm code is implementation.
The efficiency of an algorithm measures the amount of resources it needs.
There are no ways to measure space complexity and time completely.
Shorter codes always have greater ease of implementation than longer codes.

The efficiency of an algorithm measures the amount of resources it needs.

1. To find out which side effects occur most often in the raw medical data, an appropriate algorithm would be a frequency count algorithm. Here's how you can use this algorithm:

- Initialize an empty dictionary to store the side effects as keys and their frequency counts as values.
- Iterate through each entry in the raw medical data:
- For each entry, check if the side effect already exists in the dictionary.
- If it does, increment its count by 1.
- If it doesn't, add it as a new key with an initial count of 1.
- Once you have iterated through all the data, you will have a dictionary with the side effects and their frequency counts.
- You can then sort the side effects based on their frequency counts to identify the most common ones.

So, the answer to question 1 would be: None of the provided options (Bubble sort, For loop, Binary search, Linear search) is specifically designed for counting the frequency of side effects in the data.

2. The correct answer to question 2 is: "The efficiency of an algorithm measures the amount of resources it needs." This statement is true. The efficiency of an algorithm refers to how well it utilizes resources, such as time and space. It is an important factor to consider when choosing or designing algorithms, as more efficient algorithms will typically be more desirable.

1. To find the side effects that occur most often in the raw medical data, an appropriate algorithm would be a "For loop". A For loop allows you to iterate through the data and keep track of the frequency of each side effect. By comparing and updating the frequencies, you can determine which side effects occur most frequently.

2. The correct statement is: "The efficiency of an algorithm measures the amount of resources it needs." Efficiency refers to how well an algorithm utilizes resources such as time and space. It is important to consider the efficiency of an algorithm to ensure optimal performance and resource utilization.