SLB interview question

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