We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Sherlock and Squares
Sherlock and Squares
Sort by
recency
|
1573 Discussions
|
Please Login in order to post a comment
Sherlock and Squares always bring that unique style, and their discount BJJ rash guards are a steal! Whether you're rolling on the mats or just want some slick gear, this is the spot to check out. Quality, comfort, and savings—what more could you ask for? More Info: https://getagripbjj.com/
Here are my c++ solutions, you can watch the explanation here : https://youtu.be/LtU0ItsvbMI
Solution 1 O(√n)
Solution 2 O(1)
python solution with
O(1)
.Here is my Python solution! The highest and lowest variables are the highest and lowest square root that are between a and b. If the lowest is greater than b, we know that there are no perfect squares. Otherwise, it is simply the difference between the highest and lowest plus 1.
Python