Answer the question
In order to leave comments, you need to log in
How to find squares from a given series of integers (for example, 4, 16, 25, etc.)?
What is the search algorithm here?
Answer the question
In order to leave comments, you need to log in
Take the square root on the forehead and see if the number is an integer.
If the range is limited, you can pre-compile a list of all the squares in this range and search among them - this can be faster.
Here , for example, they are looking for the fastest way to determine whether a number is the square of an integer for long numbers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question