Valid Perfect Square Solutions in GoNumber 367Difficulty EasyAcceptance 41.7%Link LeetCodeOther languages C++SolutionsGo solution by halfrost/LeetCode-Gopackage leetcode func isPerfectSquare(num int) bool { low, high := 1, num for low <= high { mid := low + (high-low)>>1 if mid*mid == num { return true } else if mid*mid < num { low = mid + 1 } else { high = mid - 1 } } return false}package leetcode func isPerfectSquare(num int) bool { low, high := 1, num for low <= high { mid := low + (high-low)>>1 if mid*mid == num { return true } else if mid*mid < num { low = mid + 1 } else { high = mid - 1 } } return false }