Consider the following algorithm: procedure f(arr, T):     i…

Consider the following algorithm: procedure f(arr, T):     i = 0     j = length(arr) – 1          while i < j:              if arr + arr == T:                  return (arr, arr)             else if arr + arr < T:                 i = i + 1             else:                  j = j - 1     return null   What is the time complexity of the algorithm?  

Consider the following algorithm: procedure f(arr, T):     i…

Consider the following algorithm: procedure f(arr, T):     i = 0     j = length(arr) – 1          while i < j:              if arr + arr == T:                  return (arr, arr)             else if arr + arr < T:                 i = i + 1             else:                  j = j - 1     return null   What is the time complexity of the algorithm?