Analyze the worst-case time complexity of the algorithm you devised in Exercise 32 of Section 3.1 for finding all terms of a sequence that are greater than the sum of all previous terms.

Solution :Step 1:In this problem, we have to explain the worst-case time complexity and we have to find an algorithm that finds all terms of a finite sequence of integers that are greater than the sum of all previous terms of the sequence.Step 2:1) Worst Case:In the worst case time complexity, we calculate upper bound on running time of an algorithm. We know that the case a maximum number of operations to be executed.For linear search, the worst case happens when the element to be searched is not present in the array. If x is not present, then the search() functions compare it with all the elements of arr[] one by one. Therefore, the worst case time complexity of linear search is defined by (n).