Answer:
A Simple Solution is to sort the array in increasing order. The first two elements in sorted array would be two smallest elements. Time complexity of this solution is O(n Log n).
A Better Solution is to scan the array twice. In first traversal find the minimum element. Let this element be x. In second traversal, find the smallest element greater than x. Time complexity of this solution is O(n).
The above solution requires two traversals of input array.
An Efficient Solution can find the minimum two elements in one traversal. Below is complete algorithm.
Algorithm:
Explanation:
Carbon monoxide is a highly toxic gas. The combustion engine used in cars can produce very high concentrations of CO. Those who work in the garage for a long period would breath a dangerous amount of CO.Answer: A. Never leaving a car running in a garage.
<span>A massage is an example of a service that can be purchased.
</span>
Answer:
forest trees ,trees ,plam trees