Easiest solution ever? Python 1 liner


  • -7
    T

    Here's my solution:

    class Solution(object):
    def mySqrt(self, x):
        """
        :type x: int
        :rtype: int
        """
        return int(x**(0.5))
    

    Easiest solution ever? Am I cheating the system? :)


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.