[integer-sqrt] add comment to credit 'newton's method'

This commit is contained in:
Danny Ryan 2018-09-30 10:04:02 -05:00
parent 82ec8dfdc2
commit ec1eee4133

View File

@ -302,6 +302,7 @@ Finally, we define `integer_sqrt` for use in reward/penalty calculations:
```python
def integer_sqrt(n):
# Utilizes "Newton's Method"
x = n
y = (x + 1) // 2
while y < x: