Ejemplo n.º 1
0
        public void IsPerfectSquareTest()
        {
            var s = new Solution();

            Assert.True(s.IsPerfectSquare(1));
            Assert.False(s.IsPerfectSquare(7));
            Assert.True(s.IsPerfectSquare(9));
            Assert.True(s.IsPerfectSquare(16));
            Assert.False(s.IsPerfectSquare(2147483647));

            // Test case 37/70 - https://leetcode.com/submissions/detail/341343931/
            Assert.True(s.IsPerfectSquare(808201));
        }