The code I am trying to find the time complexity of is
int i=1,s=1;
while (s<=n)
i++
s+=i;
print("*")
I traced it with n = 10 and, if I'm doing it correctly, this runs 4 times for this instance. I cannot figure out what the general complexity would be, I keep thinking log base2(n) but this doesn't exactly work. Would really like to know how to find this or if it is just some simple equation I'm not thinking of.