Let us suppose a scenario where n is decreasing by 1 in each loop, so in order to reach 1 it will take n iterations , n=6 to 1 take 6 iterations,now in question here n is decreasing by 2 like if n=6 it will become 4 then 2 and then 0 so the iterations are reduced by half it will take 3 iterations so n/2 time =O(n)