{"id":74,"date":"2020-03-23T08:05:19","date_gmt":"2020-03-23T08:05:19","guid":{"rendered":"http:\/\/feellikelearning.com\/?p=74"},"modified":"2022-06-26T01:18:47","modified_gmt":"2022-06-26T01:18:47","slug":"algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution","status":"publish","type":"post","link":"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/","title":{"rendered":"\u7b97\u6cd5\u7ec3\u4e60 Leetcode \u529b\u6263 69. Sqrt(x) Python, Java, C++, Scala \u89e3\u6cd5"},"content":{"rendered":"\n<p>\u8fd9\u9898\u662f\u7ecf\u5178\u7b97\u6cd5\u4e8c\u5206\u67e5\u627e\uff08binary search\uff09\u7684\u5e94\u7528\u3002\u505a\u9898\u4e4b\u524d\u5148\u590d\u4e60<a href=\"http:\/\/feellikelearning.com\/index.php\/2020\/03\/15\/binarysearch\/\">binary search\u7684\u7ecf\u5178\u5b9e\u73b0<\/a>\uff0c\u6ce8\u610f\u51e0\u4e2a\u7ec6\u8282\u3002\u4f46\u662f\u548c\u4e00\u822cbinary search\u4e0d\u540c\uff0c\u8fd9\u9898\u4e0d\u662f\u627e\u4e00\u4e2a\u7279\u5b9a\u7684\u6570\uff0c\u800c\u662f\u8981\u627e\u5230\u4e00\u4e2a\u6574\u6570\u6b63\u597d\u662fsqrt(x)\u7684\u6574\u6570\u90e8\u5206\uff0c\u800c\u53c8\u4e0d\u80fd\u76f4\u63a5\u6c42\u51fasqrt(x)\u3002\u6211\u60f3\u4e86\u4e00\u4e0b\uff0c\u53ef\u4ee5\u8868\u8fbe\u6210\u4ece[0, x]\u4e2d\u627e\u51fa\u4e00\u4e2a\u6574\u6570\uff0c\u8fd9\u4e2a\u6574\u6570<code>ans<\/code>\u6ee1\u8db3<code>ans^2 &lt;= x<\/code>\uff0c\u800c\u540c\u65f6<code>(ans + 1)^2 &gt; x<\/code>\u3002<\/p>\n\n\n\n<p> Python\u5b9e\u73b0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Solution(object):\n    def mySqrt(self, x):\n        \"\"\"\n        :type x: int\n        :rtype: int\n        \"\"\"\n        l = 0\n        h = x\n        while l &lt;= h:\n            m = l + (h - l) \/ 2\n            sq = m ** 2\n            if sq &lt;= x and (m + 1) ** 2 &gt; x:\n                return m\n            elif sq &gt; x:\n                h = m - 1\n            else:\n                l = m + 1\n        <\/code><\/pre>\n\n\n\n<p>Scala \u5b9e\u73b01 \u4f7f\u7528while loop\uff0c\u601d\u8def\u6bd4\u8f83\u50cfJava<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import scala.util.control.Breaks._\n\nobject Solution {\n    def mySqrt(x: Int): Int = {\n        var l: Int = 0\n        var h: Int = x\n        while (l &lt;= h) {\n            val m : Int = l + (h - l) \/ 2\n            val sq: Double = 1.0 * m * m \n            if (sq &lt;= x &amp;&amp; (m + 1.0) * (m + 1.0) &gt; x) {    \n                return m\n            } else if (sq &gt; x) {\n                h = m - 1\n            } else {\n                l = m + 1\n            }\n        }\n        -1\n    }\n}<\/code><\/pre>\n\n\n\n<p>\u548c Python \u4e0d\u4e00\u6837\u7684\u662f\uff0cScala Int \u5e73\u65b9\u540e\u4f1a\u6ea2\u51fa\uff0c\u800cfloat\u7cbe\u5ea6\u4e0d\u591f\uff0c\u5fc5\u987b\u7528double\u624d\u80fd\u8fc7OJ\u3002\u7528Long\uff0864\u4f4d\uff09\u4e5f\u53ef\u4ee5\u3002<\/p>\n\n\n\n<p>Scala \u5b9e\u73b02 \u4f7f\u7528recursion\u4ee3\u66ffwhile loop\uff0c\u5e73\u65b9\u7528Long\u8868\u793a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>object Solution {\n    def mySqrt(x: Int): Int = {\n        helper(x, 0, x)\n    }\n    \n    def helper(x: Int, l: Int, h: Int): Int = {\n        val m: Int = l + (h - l) \/ 2\n        val sq: Long = m.asInstanceOf&#91;Long] * m.asInstanceOf&#91;Long]\n        \n        if (sq &lt;= x &amp;&amp; (m + 1).asInstanceOf&#91;Long] * (m + 1).asInstanceOf&#91;Long] &gt; x) {\n            m\n        } else if (sq &gt; x) {\n            helper(x, l, m - 1)\n        } else {\n            helper(x, m + 1, h)\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<p>Scala \u5b9e\u73b03 \u4f7f\u7528recursion\u4ee3\u66ffwhile loop\uff0c\u5e73\u65b9\u7528Double\u8868\u793a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import scala.util.control.Breaks._\n\nobject Solution {\n    def mySqrt(x: Int): Int = {\n        helper(x, 0, x)\n    }\n    \n    def helper(x: Int, l: Int, h: Int): Int = {\n        val m: Int = l + (h - l) \/ 2\n        val sq: Double = 1.0 * m * m\n        \n        if (sq &lt;= x &amp;&amp; (m + 1.0) * (m + 1.0) &gt; x) {\n            m\n        } else if (sq &gt; x) {\n            helper(x, l, m - 1)\n        } else {\n            helper(x, m + 1, h)\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<p>\u65f6\u95f4\u4e0a\u597d\u50cf\u6ca1\u5dee\u592a\u591a\uff0c\u534a\u65a4\u516b\u4e24\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u9898\u662f\u7ecf\u5178\u7b97\u6cd5\u4e8c\u5206\u67e5\u627e\uff08binary search\uff09\u7684\u5e94\u7528\u3002\u505a\u9898\u4e4b\u524d\u5148\u590d\u4e60binary search\u7684\u7ecf\u5178\u5b9e\u73b0\uff0c\u6ce8\u610f\u51e0\u4e2a\u7ec6\u8282\u3002\u4f46\u662f\u548c\u4e00\u822cbinary search\u4e0d\u540c\uff0c\u8fd9\u9898\u4e0d\u662f\u627e\u4e00\u4e2a\u7279\u5b9a\u7684\u6570\uff0c\u800c\u662f\u8981\u627e\u5230\u4e00\u4e2a\u6574\u6570\u6b63\u597d\u662fsqrt(x)\u7684\u6574\u6570\u90e8\u5206\uff0c\u800c\u53c8\u4e0d\u80fd\u76f4\u63a5\u6c42\u51fasqrt(x)\u3002\u6211\u60f3\u4e86\u4e00\u4e0b\uff0c\u53ef\u4ee5\u8868\u8fbe\u6210\u4ece[0, x]\u4e2d\u627e\u51fa\u4e00\u4e2a\u6574\u6570\uff0c\u8fd9\u4e2a\u6574\u6570ans\u6ee1\u8db3ans^2 &lt;= x\uff0c\u800c\u540c\u65f6(ans + 1)^2 &gt; x\u3002 Python\u5b9e\u73b0 Scala \u5b9e\u73b01 \u4f7f\u7528while loop\uff0c\u601d\u8def\u6bd4\u8f83\u50cfJava \u548c Python \u4e0d\u4e00\u6837\u7684\u662f\uff0cScala Int \u5e73\u65b9\u540e\u4f1a\u6ea2\u51fa\uff0c\u800cfloat\u7cbe\u5ea6\u4e0d\u591f\uff0c\u5fc5\u987b\u7528double\u624d\u80fd\u8fc7OJ\u3002\u7528Long\uff0864\u4f4d\uff09\u4e5f\u53ef\u4ee5\u3002 Scala \u5b9e\u73b02 \u4f7f\u7528recursion\u4ee3\u66ffwhile loop\uff0c\u5e73\u65b9\u7528Long\u8868\u793a Scala \u5b9e\u73b03 \u4f7f\u7528recursion\u4ee3\u66ffwhile loop\uff0c\u5e73\u65b9\u7528Double\u8868\u793a \u65f6\u95f4\u4e0a\u597d\u50cf\u6ca1\u5dee\u592a\u591a\uff0c\u534a\u65a4\u516b\u4e24\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.10 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u7b97\u6cd5\u7ec3\u4e60 Leetcode \u529b\u6263 69. Sqrt(x) Python, Java, C++, Scala \u89e3\u6cd5 | Feel Like Learning<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u7b97\u6cd5\u7ec3\u4e60 Leetcode \u529b\u6263 69. Sqrt(x) Python, Java, C++, Scala \u89e3\u6cd5 | Feel Like Learning\" \/>\n<meta property=\"og:description\" content=\"\u8fd9\u9898\u662f\u7ecf\u5178\u7b97\u6cd5\u4e8c\u5206\u67e5\u627e\uff08binary search\uff09\u7684\u5e94\u7528\u3002\u505a\u9898\u4e4b\u524d\u5148\u590d\u4e60binary search\u7684\u7ecf\u5178\u5b9e\u73b0\uff0c\u6ce8\u610f\u51e0\u4e2a\u7ec6\u8282\u3002\u4f46\u662f\u548c\u4e00\u822cbinary search\u4e0d\u540c\uff0c\u8fd9\u9898\u4e0d\u662f\u627e\u4e00\u4e2a\u7279\u5b9a\u7684\u6570\uff0c\u800c\u662f\u8981\u627e\u5230\u4e00\u4e2a\u6574\u6570\u6b63\u597d\u662fsqrt(x)\u7684\u6574\u6570\u90e8\u5206\uff0c\u800c\u53c8\u4e0d\u80fd\u76f4\u63a5\u6c42\u51fasqrt(x)\u3002\u6211\u60f3\u4e86\u4e00\u4e0b\uff0c\u53ef\u4ee5\u8868\u8fbe\u6210\u4ece[0, x]\u4e2d\u627e\u51fa\u4e00\u4e2a\u6574\u6570\uff0c\u8fd9\u4e2a\u6574\u6570ans\u6ee1\u8db3ans^2 &lt;= x\uff0c\u800c\u540c\u65f6(ans + 1)^2 &gt; x\u3002 Python\u5b9e\u73b0 Scala \u5b9e\u73b01 \u4f7f\u7528while loop\uff0c\u601d\u8def\u6bd4\u8f83\u50cfJava \u548c Python \u4e0d\u4e00\u6837\u7684\u662f\uff0cScala Int \u5e73\u65b9\u540e\u4f1a\u6ea2\u51fa\uff0c\u800cfloat\u7cbe\u5ea6\u4e0d\u591f\uff0c\u5fc5\u987b\u7528double\u624d\u80fd\u8fc7OJ\u3002\u7528Long\uff0864\u4f4d\uff09\u4e5f\u53ef\u4ee5\u3002 Scala \u5b9e\u73b02 \u4f7f\u7528recursion\u4ee3\u66ffwhile loop\uff0c\u5e73\u65b9\u7528Long\u8868\u793a Scala \u5b9e\u73b03 \u4f7f\u7528recursion\u4ee3\u66ffwhile loop\uff0c\u5e73\u65b9\u7528Double\u8868\u793a \u65f6\u95f4\u4e0a\u597d\u50cf\u6ca1\u5dee\u592a\u591a\uff0c\u534a\u65a4\u516b\u4e24\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant\" \/>\n<meta property=\"og:site_name\" content=\"Feel Like Learning\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-23T08:05:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-26T01:18:47+00:00\" \/>\n<meta name=\"author\" content=\"feellikelearning\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"feellikelearning\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant#article\",\"isPartOf\":{\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant\"},\"author\":{\"name\":\"feellikelearning\",\"@id\":\"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a\"},\"headline\":\"\u7b97\u6cd5\u7ec3\u4e60 Leetcode \u529b\u6263 69. Sqrt(x) Python, Java, C++, Scala \u89e3\u6cd5\",\"datePublished\":\"2020-03-23T08:05:19+00:00\",\"dateModified\":\"2022-06-26T01:18:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant\"},\"wordCount\":40,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant\",\"url\":\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant\",\"name\":\"\u7b97\u6cd5\u7ec3\u4e60 Leetcode \u529b\u6263 69. Sqrt(x) Python, Java, C++, Scala \u89e3\u6cd5 | Feel Like Learning\",\"isPartOf\":{\"@id\":\"https:\/\/feellikelearning.com\/#website\"},\"datePublished\":\"2020-03-23T08:05:19+00:00\",\"dateModified\":\"2022-06-26T01:18:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/feellikelearning.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u7b97\u6cd5\u7ec3\u4e60 Leetcode \u529b\u6263 69. Sqrt(x) Python, Java, C++, Scala \u89e3\u6cd5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/feellikelearning.com\/#website\",\"url\":\"https:\/\/feellikelearning.com\/\",\"name\":\"Feel Like Learning\",\"description\":\"\u7a0b\u5e8f\uff5c\u751f\u6d3b\uff5c\u5b66\u5230\u5c31\u662f\u8d5a\u5230\",\"publisher\":{\"@id\":\"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/feellikelearning.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a\",\"name\":\"feellikelearning\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/feellikelearning.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/72a1e86e9dcb0332e88bd7d54fd36c28?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/72a1e86e9dcb0332e88bd7d54fd36c28?s=96&d=mm&r=g\",\"caption\":\"feellikelearning\"},\"logo\":{\"@id\":\"https:\/\/feellikelearning.com\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/feellikelearning.com\/index.php\/author\/feellikelearning\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u7b97\u6cd5\u7ec3\u4e60 Leetcode \u529b\u6263 69. Sqrt(x) Python, Java, C++, Scala \u89e3\u6cd5 | Feel Like Learning","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant","og_locale":"en_US","og_type":"article","og_title":"\u7b97\u6cd5\u7ec3\u4e60 Leetcode \u529b\u6263 69. Sqrt(x) Python, Java, C++, Scala \u89e3\u6cd5 | Feel Like Learning","og_description":"\u8fd9\u9898\u662f\u7ecf\u5178\u7b97\u6cd5\u4e8c\u5206\u67e5\u627e\uff08binary search\uff09\u7684\u5e94\u7528\u3002\u505a\u9898\u4e4b\u524d\u5148\u590d\u4e60binary search\u7684\u7ecf\u5178\u5b9e\u73b0\uff0c\u6ce8\u610f\u51e0\u4e2a\u7ec6\u8282\u3002\u4f46\u662f\u548c\u4e00\u822cbinary search\u4e0d\u540c\uff0c\u8fd9\u9898\u4e0d\u662f\u627e\u4e00\u4e2a\u7279\u5b9a\u7684\u6570\uff0c\u800c\u662f\u8981\u627e\u5230\u4e00\u4e2a\u6574\u6570\u6b63\u597d\u662fsqrt(x)\u7684\u6574\u6570\u90e8\u5206\uff0c\u800c\u53c8\u4e0d\u80fd\u76f4\u63a5\u6c42\u51fasqrt(x)\u3002\u6211\u60f3\u4e86\u4e00\u4e0b\uff0c\u53ef\u4ee5\u8868\u8fbe\u6210\u4ece[0, x]\u4e2d\u627e\u51fa\u4e00\u4e2a\u6574\u6570\uff0c\u8fd9\u4e2a\u6574\u6570ans\u6ee1\u8db3ans^2 &lt;= x\uff0c\u800c\u540c\u65f6(ans + 1)^2 &gt; x\u3002 Python\u5b9e\u73b0 Scala \u5b9e\u73b01 \u4f7f\u7528while loop\uff0c\u601d\u8def\u6bd4\u8f83\u50cfJava \u548c Python \u4e0d\u4e00\u6837\u7684\u662f\uff0cScala Int \u5e73\u65b9\u540e\u4f1a\u6ea2\u51fa\uff0c\u800cfloat\u7cbe\u5ea6\u4e0d\u591f\uff0c\u5fc5\u987b\u7528double\u624d\u80fd\u8fc7OJ\u3002\u7528Long\uff0864\u4f4d\uff09\u4e5f\u53ef\u4ee5\u3002 Scala \u5b9e\u73b02 \u4f7f\u7528recursion\u4ee3\u66ffwhile loop\uff0c\u5e73\u65b9\u7528Long\u8868\u793a Scala \u5b9e\u73b03 \u4f7f\u7528recursion\u4ee3\u66ffwhile loop\uff0c\u5e73\u65b9\u7528Double\u8868\u793a \u65f6\u95f4\u4e0a\u597d\u50cf\u6ca1\u5dee\u592a\u591a\uff0c\u534a\u65a4\u516b\u4e24\u3002","og_url":"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant","og_site_name":"Feel Like Learning","article_published_time":"2020-03-23T08:05:19+00:00","article_modified_time":"2022-06-26T01:18:47+00:00","author":"feellikelearning","twitter_card":"summary_large_image","twitter_misc":{"Written by":"feellikelearning","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant#article","isPartOf":{"@id":"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant"},"author":{"name":"feellikelearning","@id":"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a"},"headline":"\u7b97\u6cd5\u7ec3\u4e60 Leetcode \u529b\u6263 69. Sqrt(x) Python, Java, C++, Scala \u89e3\u6cd5","datePublished":"2020-03-23T08:05:19+00:00","dateModified":"2022-06-26T01:18:47+00:00","mainEntityOfPage":{"@id":"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant"},"wordCount":40,"commentCount":0,"publisher":{"@id":"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a"},"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant#respond"]}]},{"@type":"WebPage","@id":"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant","url":"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant","name":"\u7b97\u6cd5\u7ec3\u4e60 Leetcode \u529b\u6263 69. Sqrt(x) Python, Java, C++, Scala \u89e3\u6cd5 | Feel Like Learning","isPartOf":{"@id":"https:\/\/feellikelearning.com\/#website"},"datePublished":"2020-03-23T08:05:19+00:00","dateModified":"2022-06-26T01:18:47+00:00","breadcrumb":{"@id":"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/feellikelearning.com\/index.php\/2020\/03\/23\/algo-prep-leetcode-69-sqrtx-python-java-c-scala-solution\/?variant=zh-hant#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/feellikelearning.com\/"},{"@type":"ListItem","position":2,"name":"\u7b97\u6cd5\u7ec3\u4e60 Leetcode \u529b\u6263 69. Sqrt(x) Python, Java, C++, Scala \u89e3\u6cd5"}]},{"@type":"WebSite","@id":"https:\/\/feellikelearning.com\/#website","url":"https:\/\/feellikelearning.com\/","name":"Feel Like Learning","description":"\u7a0b\u5e8f\uff5c\u751f\u6d3b\uff5c\u5b66\u5230\u5c31\u662f\u8d5a\u5230","publisher":{"@id":"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/feellikelearning.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a","name":"feellikelearning","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/feellikelearning.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/72a1e86e9dcb0332e88bd7d54fd36c28?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/72a1e86e9dcb0332e88bd7d54fd36c28?s=96&d=mm&r=g","caption":"feellikelearning"},"logo":{"@id":"https:\/\/feellikelearning.com\/#\/schema\/person\/image\/"},"url":"https:\/\/feellikelearning.com\/index.php\/author\/feellikelearning\/"}]}},"_links":{"self":[{"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/posts\/74"}],"collection":[{"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/comments?post=74"}],"version-history":[{"count":5,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/posts\/74\/revisions"}],"predecessor-version":[{"id":1325,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/posts\/74\/revisions\/1325"}],"wp:attachment":[{"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/media?parent=74"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/categories?post=74"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/tags?post=74"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}