function iteration_search(arr: array of integer): integer;
begin
L := 1;
H := length(arr);
while(L <= H) do begin
p := ceil((L + H) / 2);
if(k = arr[p]) then begin
BS := p;
break;
end;
if(k < arr[p]) then begin
H := p - 1;
end else begin
L := p + 1;
end;
end;
BS := 0;
result := BS;
end;