I'm trying to understand time complexities better and I was hoping someone could help me figure out the time complexity in the worst case for the following algorithm (in pseudocode):
for i= 0 to n−1:
if A[i] < 0:
b= 1
while b < n:
b=b×2
end while
end if
end for