Binary search question 2

the binary search takes logarithmic time , why here given linear time, can you clear my doubt?