You are viewing a single comment's thread. Return to all comments →
C++ O(1) solution:
int squares(int a, int b) { return floor(sqrt(b)) - ceil(sqrt(a)) +1; }
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and Squares
You are viewing a single comment's thread. Return to all comments →
C++ O(1) solution: