Final answer:
The worst-case complexity of the linear search algorithm is O(n). f(n) = (g(n)) if and only if f(n) = O(g(n)). The worst-case complexity of the bubble-sort algorithm is O(n²).
Step-by-step explanation:
a. The worst-case complexity of the linear search algorithm is O(n). In a linear search, the worst-case scenario occurs when the target element is the last element in the list or is not found at all. In both cases, the algorithm will have to iterate through all n elements. Therefore, the time complexity is linear, denoted by O(n).
b. f(n) = (g(n)) if and only if f(n) = O(g(n)). In Big O notation, f(n) = O(g(n)) means that the growth rate of f(n) is at most the growth rate of g(n). So if f(n) is equal to g(n), it implies that f(n) is also equal to O(g(n)).
f. The worst-case complexity of the bubble-sort algorithm is O(n²). Bubble sort is an ineffecient sorting algorithm with a time complexity of O(n²) in the worst case. This means that the time taken to sort an array of size n grows quadratically as the size of the array increases.