<prompt> Find the time complexity of this algorithm.def linearSearcharr, n, x: for i in range 0, n: if arri x: return i return -1  <response>: The time complexity of the given algorithm is On. This is because the algorithm has one loop for loop that runs from 0 to n-1 in the worst case scenario. The number of iterations grows linearly with the increase in the size of the input array, thus the function is said to have a linear time complexity. 