SLB Interview Question

What is the time complexity for the given code? related to linear and binary search.