{"id":88,"date":"2020-03-29T06:33:02","date_gmt":"2020-03-29T06:33:02","guid":{"rendered":"http:\/\/feellikelearning.com\/?p=88"},"modified":"2020-03-29T06:36:09","modified_gmt":"2020-03-29T06:36:09","slug":"cn-kth-smallest-in-bst-with-size","status":"publish","type":"post","link":"https:\/\/feellikelearning.com\/index.php\/2020\/03\/29\/cn-kth-smallest-in-bst-with-size\/","title":{"rendered":"\u7b97\u6cd5\u7ec3\u4e60 kth smallest element in BST with known subtree size\uff0c\u5728\u5df2\u77e5\u5b50\u6811\u5927\u5c0f\u7684\u4e8c\u53c9\u641c\u7d22\u6811\u91cc\u627e\u7b2ck\u5c0f\u7684\u5143\u7d20"},"content":{"rendered":"\n<p>\u6700\u7b80\u5355\u66b4\u529b\u7684\u5c31\u662f\u76f4\u63a5dfs\u505ain order traversal\uff0c\u8bb0\u5f55\u73b0\u5728\u662f\u7b2c\u51e0\u4e2a\u5143\u7d20\uff0c\u5f53\u7b49\u4e8ek\u65f6\u5c31\u8fd4\u56de\u3002\u8fd9\u6837\u65f6\u95f4\u590d\u6742\u5ea6\u662fO(N)\uff0c\u7a7a\u95f4O(logN)\u3002\u4f46\u662f\u8fd9\u6837\u5c31\u6ca1\u6709\u5229\u7528\u5230\u5b50\u6811\u5927\u5c0f\u5df2\u77e5\u7684\u5c5e\u6027\u3002<\/p>\n\n\n\n<p>\u6700\u4f18\u89e3\u6cd5\u662f\u5229\u7528\u5b50\u6811\u5927\u5c0f\u4fe1\u606f\u63a8\u51fa\u5f53\u524d\u8282\u70b9\u7684index\uff0c\u5982\u679c\u6bd4k\u5927\uff0c\u90a3\u4e48\u76ee\u6807\u5728\u5f53\u524d\u8282\u70b9\u5de6\u8fb9\uff0c\u5982\u679c\u6bd4k\u5c0f\u5219\u5728\u5f53\u524d\u8282\u70b9\u53f3\u8fb9\uff0c\u5982\u679c\u7b49\u4e8ek\uff0c\u5c31\u627e\u5230\u4e86\u3002\u8fd9\u6837\u53ef\u4ee5\u628a\u65f6\u95f4\u51cf\u5230O(logN)\uff0c\u7a7a\u95f4\u5219\u662fO(1)\uff0c\u4f18\u4e8e\u66b4\u529b\u89e3\u6cd5\u4e0d\u5c11\u3002<\/p>\n\n\n\n<p>\u63a8\u51fa\u5f53\u524d\u8282\u70b9\u7684index\uff0c\u53ef\u4ee5\u7528\u4e00\u4e2a\u53d8\u91cf\u8bb0\u5f55range\uff0c\u4e5f\u5c31\u662f\u5b50\u6811\u53ef\u80fd\u7684\u6700\u5c0f\u548c\u6700\u5927index\u3002<\/p>\n\n\n\n<p>\u4e00\u9053\u633a\u6709\u610f\u601d\u7684\u9898\u76ee\u3002<\/p>\n\n\n\n<p>Python<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#               50 (10)\n#          \/              \\\n#      30 (4)            70 (5)\n#     \/     \\           \/      \\\n#   20 (2)  40 (1)    60 (3)   80 (1)\n#  \/                 \/      \\\n# 5 (1)           55 (1)    65 (1)\n\nclass TreeNode:\n    def __init__(self, val):\n        self.size = 1\n        self.val = val\n        self.left = None\n        self.right = None\n\ndef build_sample_tree():\n    node50 = TreeNode(50)\n    node30 = TreeNode(30)\n    node20 = TreeNode(20)\n    node40 = TreeNode(40)\n    node70 = TreeNode(70)\n    node60 = TreeNode(60)\n    node80 = TreeNode(80)\n\n    node5 = TreeNode(5)\n    node55 = TreeNode(55)\n    node65 = TreeNode(65)\n\n    node50.left = node30\n    node50.right = node70\n    node50.size = 10\n\n    node30.left = node20\n    node30.right = node40\n    node30.size = 4\n\n    node20.left = node5\n    node20.size = 2\n\n    node70.left = node60\n    node70.right = node80\n    node70.size = 5\n\n    node60.left = node55\n    node60.right = node65\n    node60.size = 3\n\n    return node50\n\ndef dfs(root, range, n):\n    if n &lt; range[0] or n &gt; range[1]:\n        return None\n    if root is None:\n        return None\n\n    l_size = 0\n    if root.left is not None:\n        l_size = root.left.size\n    idx = range[0] + l_size\n    if idx == n:\n        return root.val\n    elif idx &lt; n:\n        range[0] = idx + 1\n        return dfs(root.right, range, n)\n    else:\n        range[1] = idx - 1\n        return dfs(root.left, range, n)\n\ndef nsmallest(root, n):\n    return dfs(root, [1, float('inf')], n)\n\n\nroot = build_sample_tree()\nfor i in range(12):\n    print '{}-th smallest: {}'.format(i, nsmallest(root, i))\n\n\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u7b80\u5355\u66b4\u529b\u7684\u5c31\u662f\u76f4\u63a5dfs\u505ain order traversal\uff0c\u8bb0\u5f55\u73b0\u5728\u662f\u7b2c\u51e0\u4e2a\u5143\u7d20\uff0c\u5f53\u7b49\u4e8ek\u65f6\u5c31\u8fd4\u56de\u3002\u8fd9\u6837\u65f6\u95f4\u590d\u6742\u5ea6\u662fO(N)\uff0c\u7a7a\u95f4O(logN)\u3002\u4f46\u662f\u8fd9\u6837\u5c31\u6ca1\u6709\u5229\u7528\u5230\u5b50\u6811\u5927\u5c0f\u5df2\u77e5\u7684\u5c5e\u6027\u3002 \u6700\u4f18\u89e3\u6cd5\u662f\u5229\u7528\u5b50\u6811\u5927\u5c0f\u4fe1\u606f\u63a8\u51fa\u5f53\u524d\u8282\u70b9\u7684index\uff0c\u5982\u679c\u6bd4k\u5927\uff0c\u90a3\u4e48\u76ee\u6807\u5728\u5f53\u524d\u8282\u70b9\u5de6\u8fb9\uff0c\u5982\u679c\u6bd4k\u5c0f\u5219\u5728\u5f53\u524d\u8282\u70b9\u53f3\u8fb9\uff0c\u5982\u679c\u7b49\u4e8ek\uff0c\u5c31\u627e\u5230\u4e86\u3002\u8fd9\u6837\u53ef\u4ee5\u628a\u65f6\u95f4\u51cf\u5230O(logN)\uff0c\u7a7a\u95f4\u5219\u662fO(1)\uff0c\u4f18\u4e8e\u66b4\u529b\u89e3\u6cd5\u4e0d\u5c11\u3002 \u63a8\u51fa\u5f53\u524d\u8282\u70b9\u7684index\uff0c\u53ef\u4ee5\u7528\u4e00\u4e2a\u53d8\u91cf\u8bb0\u5f55range\uff0c\u4e5f\u5c31\u662f\u5b50\u6811\u53ef\u80fd\u7684\u6700\u5c0f\u548c\u6700\u5927index\u3002 \u4e00\u9053\u633a\u6709\u610f\u601d\u7684\u9898\u76ee\u3002 Python # 50 (10) # \/ \\ # 30 (4) 70 (5) # \/ \\ \/ \\ # 20 (2) 40 (1) 60 (3) 80 (1) # \/ \/ \\ # 5 (1) 55&#8230;<br \/><a class=\"read-more-button\" href=\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/29\/cn-kth-smallest-in-bst-with-size\/\">Read more<\/a><\/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 kth smallest element in BST with known subtree size\uff0c\u5728\u5df2\u77e5\u5b50\u6811\u5927\u5c0f\u7684\u4e8c\u53c9\u641c\u7d22\u6811\u91cc\u627e\u7b2ck\u5c0f\u7684\u5143\u7d20 | 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\/29\/cn-kth-smallest-in-bst-with-size\/?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 kth smallest element in BST with known subtree size\uff0c\u5728\u5df2\u77e5\u5b50\u6811\u5927\u5c0f\u7684\u4e8c\u53c9\u641c\u7d22\u6811\u91cc\u627e\u7b2ck\u5c0f\u7684\u5143\u7d20 | Feel Like Learning\" \/>\n<meta property=\"og:description\" content=\"\u6700\u7b80\u5355\u66b4\u529b\u7684\u5c31\u662f\u76f4\u63a5dfs\u505ain order traversal\uff0c\u8bb0\u5f55\u73b0\u5728\u662f\u7b2c\u51e0\u4e2a\u5143\u7d20\uff0c\u5f53\u7b49\u4e8ek\u65f6\u5c31\u8fd4\u56de\u3002\u8fd9\u6837\u65f6\u95f4\u590d\u6742\u5ea6\u662fO(N)\uff0c\u7a7a\u95f4O(logN)\u3002\u4f46\u662f\u8fd9\u6837\u5c31\u6ca1\u6709\u5229\u7528\u5230\u5b50\u6811\u5927\u5c0f\u5df2\u77e5\u7684\u5c5e\u6027\u3002 \u6700\u4f18\u89e3\u6cd5\u662f\u5229\u7528\u5b50\u6811\u5927\u5c0f\u4fe1\u606f\u63a8\u51fa\u5f53\u524d\u8282\u70b9\u7684index\uff0c\u5982\u679c\u6bd4k\u5927\uff0c\u90a3\u4e48\u76ee\u6807\u5728\u5f53\u524d\u8282\u70b9\u5de6\u8fb9\uff0c\u5982\u679c\u6bd4k\u5c0f\u5219\u5728\u5f53\u524d\u8282\u70b9\u53f3\u8fb9\uff0c\u5982\u679c\u7b49\u4e8ek\uff0c\u5c31\u627e\u5230\u4e86\u3002\u8fd9\u6837\u53ef\u4ee5\u628a\u65f6\u95f4\u51cf\u5230O(logN)\uff0c\u7a7a\u95f4\u5219\u662fO(1)\uff0c\u4f18\u4e8e\u66b4\u529b\u89e3\u6cd5\u4e0d\u5c11\u3002 \u63a8\u51fa\u5f53\u524d\u8282\u70b9\u7684index\uff0c\u53ef\u4ee5\u7528\u4e00\u4e2a\u53d8\u91cf\u8bb0\u5f55range\uff0c\u4e5f\u5c31\u662f\u5b50\u6811\u53ef\u80fd\u7684\u6700\u5c0f\u548c\u6700\u5927index\u3002 \u4e00\u9053\u633a\u6709\u610f\u601d\u7684\u9898\u76ee\u3002 Python # 50 (10) # \/  # 30 (4) 70 (5) # \/  \/  # 20 (2) 40 (1) 60 (3) 80 (1) # \/ \/  # 5 (1) 55...Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant\" \/>\n<meta property=\"og:site_name\" content=\"Feel Like Learning\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-29T06:33:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-03-29T06:36:09+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=\"1 minute\" \/>\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\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant#article\",\"isPartOf\":{\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant\"},\"author\":{\"name\":\"feellikelearning\",\"@id\":\"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a\"},\"headline\":\"\u7b97\u6cd5\u7ec3\u4e60 kth smallest element in BST with known subtree size\uff0c\u5728\u5df2\u77e5\u5b50\u6811\u5927\u5c0f\u7684\u4e8c\u53c9\u641c\u7d22\u6811\u91cc\u627e\u7b2ck\u5c0f\u7684\u5143\u7d20\",\"datePublished\":\"2020-03-29T06:33:02+00:00\",\"dateModified\":\"2020-03-29T06:36:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant\"},\"wordCount\":30,\"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\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant\",\"url\":\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant\",\"name\":\"\u7b97\u6cd5\u7ec3\u4e60 kth smallest element in BST with known subtree size\uff0c\u5728\u5df2\u77e5\u5b50\u6811\u5927\u5c0f\u7684\u4e8c\u53c9\u641c\u7d22\u6811\u91cc\u627e\u7b2ck\u5c0f\u7684\u5143\u7d20 | Feel Like Learning\",\"isPartOf\":{\"@id\":\"https:\/\/feellikelearning.com\/#website\"},\"datePublished\":\"2020-03-29T06:33:02+00:00\",\"dateModified\":\"2020-03-29T06:36:09+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/feellikelearning.com\/index.php\/2020\/03\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/feellikelearning.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u7b97\u6cd5\u7ec3\u4e60 kth smallest element in BST with known subtree size\uff0c\u5728\u5df2\u77e5\u5b50\u6811\u5927\u5c0f\u7684\u4e8c\u53c9\u641c\u7d22\u6811\u91cc\u627e\u7b2ck\u5c0f\u7684\u5143\u7d20\"}]},{\"@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 kth smallest element in BST with known subtree size\uff0c\u5728\u5df2\u77e5\u5b50\u6811\u5927\u5c0f\u7684\u4e8c\u53c9\u641c\u7d22\u6811\u91cc\u627e\u7b2ck\u5c0f\u7684\u5143\u7d20 | 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\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant","og_locale":"en_US","og_type":"article","og_title":"\u7b97\u6cd5\u7ec3\u4e60 kth smallest element in BST with known subtree size\uff0c\u5728\u5df2\u77e5\u5b50\u6811\u5927\u5c0f\u7684\u4e8c\u53c9\u641c\u7d22\u6811\u91cc\u627e\u7b2ck\u5c0f\u7684\u5143\u7d20 | Feel Like Learning","og_description":"\u6700\u7b80\u5355\u66b4\u529b\u7684\u5c31\u662f\u76f4\u63a5dfs\u505ain order traversal\uff0c\u8bb0\u5f55\u73b0\u5728\u662f\u7b2c\u51e0\u4e2a\u5143\u7d20\uff0c\u5f53\u7b49\u4e8ek\u65f6\u5c31\u8fd4\u56de\u3002\u8fd9\u6837\u65f6\u95f4\u590d\u6742\u5ea6\u662fO(N)\uff0c\u7a7a\u95f4O(logN)\u3002\u4f46\u662f\u8fd9\u6837\u5c31\u6ca1\u6709\u5229\u7528\u5230\u5b50\u6811\u5927\u5c0f\u5df2\u77e5\u7684\u5c5e\u6027\u3002 \u6700\u4f18\u89e3\u6cd5\u662f\u5229\u7528\u5b50\u6811\u5927\u5c0f\u4fe1\u606f\u63a8\u51fa\u5f53\u524d\u8282\u70b9\u7684index\uff0c\u5982\u679c\u6bd4k\u5927\uff0c\u90a3\u4e48\u76ee\u6807\u5728\u5f53\u524d\u8282\u70b9\u5de6\u8fb9\uff0c\u5982\u679c\u6bd4k\u5c0f\u5219\u5728\u5f53\u524d\u8282\u70b9\u53f3\u8fb9\uff0c\u5982\u679c\u7b49\u4e8ek\uff0c\u5c31\u627e\u5230\u4e86\u3002\u8fd9\u6837\u53ef\u4ee5\u628a\u65f6\u95f4\u51cf\u5230O(logN)\uff0c\u7a7a\u95f4\u5219\u662fO(1)\uff0c\u4f18\u4e8e\u66b4\u529b\u89e3\u6cd5\u4e0d\u5c11\u3002 \u63a8\u51fa\u5f53\u524d\u8282\u70b9\u7684index\uff0c\u53ef\u4ee5\u7528\u4e00\u4e2a\u53d8\u91cf\u8bb0\u5f55range\uff0c\u4e5f\u5c31\u662f\u5b50\u6811\u53ef\u80fd\u7684\u6700\u5c0f\u548c\u6700\u5927index\u3002 \u4e00\u9053\u633a\u6709\u610f\u601d\u7684\u9898\u76ee\u3002 Python # 50 (10) # \/  # 30 (4) 70 (5) # \/  \/  # 20 (2) 40 (1) 60 (3) 80 (1) # \/ \/  # 5 (1) 55...Read more","og_url":"https:\/\/feellikelearning.com\/index.php\/2020\/03\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant","og_site_name":"Feel Like Learning","article_published_time":"2020-03-29T06:33:02+00:00","article_modified_time":"2020-03-29T06:36:09+00:00","author":"feellikelearning","twitter_card":"summary_large_image","twitter_misc":{"Written by":"feellikelearning","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/feellikelearning.com\/index.php\/2020\/03\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant#article","isPartOf":{"@id":"https:\/\/feellikelearning.com\/index.php\/2020\/03\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant"},"author":{"name":"feellikelearning","@id":"https:\/\/feellikelearning.com\/#\/schema\/person\/91fb815bebebf166c217b5e3764d437a"},"headline":"\u7b97\u6cd5\u7ec3\u4e60 kth smallest element in BST with known subtree size\uff0c\u5728\u5df2\u77e5\u5b50\u6811\u5927\u5c0f\u7684\u4e8c\u53c9\u641c\u7d22\u6811\u91cc\u627e\u7b2ck\u5c0f\u7684\u5143\u7d20","datePublished":"2020-03-29T06:33:02+00:00","dateModified":"2020-03-29T06:36:09+00:00","mainEntityOfPage":{"@id":"https:\/\/feellikelearning.com\/index.php\/2020\/03\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant"},"wordCount":30,"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\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant#respond"]}]},{"@type":"WebPage","@id":"https:\/\/feellikelearning.com\/index.php\/2020\/03\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant","url":"https:\/\/feellikelearning.com\/index.php\/2020\/03\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant","name":"\u7b97\u6cd5\u7ec3\u4e60 kth smallest element in BST with known subtree size\uff0c\u5728\u5df2\u77e5\u5b50\u6811\u5927\u5c0f\u7684\u4e8c\u53c9\u641c\u7d22\u6811\u91cc\u627e\u7b2ck\u5c0f\u7684\u5143\u7d20 | Feel Like Learning","isPartOf":{"@id":"https:\/\/feellikelearning.com\/#website"},"datePublished":"2020-03-29T06:33:02+00:00","dateModified":"2020-03-29T06:36:09+00:00","breadcrumb":{"@id":"https:\/\/feellikelearning.com\/index.php\/2020\/03\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/feellikelearning.com\/index.php\/2020\/03\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/feellikelearning.com\/index.php\/2020\/03\/29\/cn-kth-smallest-in-bst-with-size\/?variant=zh-hant#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/feellikelearning.com\/"},{"@type":"ListItem","position":2,"name":"\u7b97\u6cd5\u7ec3\u4e60 kth smallest element in BST with known subtree size\uff0c\u5728\u5df2\u77e5\u5b50\u6811\u5927\u5c0f\u7684\u4e8c\u53c9\u641c\u7d22\u6811\u91cc\u627e\u7b2ck\u5c0f\u7684\u5143\u7d20"}]},{"@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\/88"}],"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=88"}],"version-history":[{"count":2,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/posts\/88\/revisions"}],"predecessor-version":[{"id":90,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/posts\/88\/revisions\/90"}],"wp:attachment":[{"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/media?parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/categories?post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/feellikelearning.com\/index.php\/wp-json\/wp\/v2\/tags?post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}