function mystery(x, y){
z := 1

while (y != 0){

if y % 2 = 0){
x = x * x
y = y / 2
}else{
z = z * x
y = y - 1
}
return z;
}
can anyone can help to analyse this function..is O(n) or O(log n) or .....