The following functions are from c++11.
double sqrt (double x);
float sqrt (float x);
long double sqrt (long double x);
double sqrt (T x);
I guess because it helps people to use binary search to practice.
Yes, I also think the question is pretty ambiguous on that aspect. What happens if the input is like 2 (or any other number with no Integer roots) whats the output?
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.