Given a positive integernum, write a function which returns True ifnumis a perfect square else False.
Note:Do notuse any built-in library function such assqrt.
Example 1: ?Input: 16 ?Returns: True
Example 2:?Input: 14 ? Returns: False
除了1 以外, 所以數(shù)的平方跟都小于等于這個(gè)數(shù)的二分之一靴姿, 二分查找法