Integer square root without a library call
You need the floor of for an integer n >= 0, and you cannot use floating point (a risk system flagged rounding drift). Return the largest integer r with r * r <= n.
n = 8 -> 2 (2*2 = 4 <= 8, 3*3 = 9 > 8)
n = 16 -> 4
n = 0 -> 0
Return floor(sqrt(n)) using integer operations.
Your answer
This one is open-ended. Work it through, then check your reasoning against the full solution.