def integer_square_root(k):

low = 0

high = k

while low < high:

```
mid = (low + high)//2
if mid*mid < = k and (mid+1)*(mid+1)>k:
return mid
elif mid*mid > k:
high = mid -1
else:
low = mid +1
```

Course: Educative: Interactive Courses for Software Developers

Lesson: Educative: Interactive Courses for Software Developers