Find whether a given number is a perfect square or not -- Microsoft