{"id":775,"date":"2023-08-10T09:59:15","date_gmt":"2023-08-10T01:59:15","guid":{"rendered":"https:\/\/zhaocunwei.co.uk\/?p=775"},"modified":"2023-08-10T10:22:12","modified_gmt":"2023-08-10T02:22:12","slug":"treap","status":"publish","type":"post","link":"https:\/\/zhaocunwei.co.uk\/index.php\/2023\/08\/10\/treap\/","title":{"rendered":"Treap\u7684\u7406\u8bba\u4e0eJava\u4ee3\u7801\u5b9e\u73b0"},"content":{"rendered":"<h1>\u524d\u8a00<\/h1>\n<p>Treap\uff08\u6811\u5806\uff09\u662f\u4e00\u79cd\u6570\u636e\u7ed3\u6784\uff0c\u540c\u65f6\u5177\u6709\u4e8c\u53c9\u641c\u7d22\u6811\uff08BST\uff09\u548c\u6700\u5c0f\u5806\u7684\u7279\u6027\u3002\u5b83\u7684\u5b9e\u73b0\u76f8\u5bf9\u7b80\u5355\uff0c\u901a\u5e38\u7528\u4e8e\u9700\u8981\u540c\u65f6\u7ef4\u62a4\u5143\u7d20\u987a\u5e8f\u548c\u4f18\u5148\u7ea7\u7684\u60c5\u51b5\u3002<\/p>\n<h1>Treap\u7684\u7406\u8bba\u89e3\u91ca<\/h1>\n<p>Treap\u7684\u6bcf\u4e2a\u8282\u70b9\u5305\u542b\u4e24\u4e2a\u5c5e\u6027\uff1a\u4e00\u4e2a\u952e\u503c\u548c\u4e00\u4e2a\u968f\u673a\u4f18\u5148\u7ea7\u3002\u5b83\u6ee1\u8db3\u4ee5\u4e0b\u4e24\u4e2a\u6027\u8d28\uff1a<br \/>\nBST\u6027\u8d28\uff1a \u6bcf\u4e2a\u8282\u70b9\u7684\u5de6\u5b50\u6811\u4e2d\u7684\u952e\u503c\u5c0f\u4e8e\u8be5\u8282\u70b9\u7684\u952e\u503c\uff0c\u53f3\u5b50\u6811\u4e2d\u7684\u952e\u503c\u5927\u4e8e\u8be5\u8282\u70b9\u7684\u952e\u503c\u3002<br \/>\n\u5806\u6027\u8d28\uff1a \u6bcf\u4e2a\u8282\u70b9\u7684\u4f18\u5148\u7ea7\u5927\u4e8e\u5176\u5b50\u8282\u70b9\u7684\u4f18\u5148\u7ea7\u3002<br \/>\n\u8fd9\u4e24\u4e2a\u6027\u8d28\u5171\u540c\u786e\u4fdd\u4e86Treap\u7684\u6709\u5e8f\u6027\u548c\u4f18\u5148\u7ea7\u6027\u3002<\/p>\n<h1>Java\u4ee3\u7801\u5b9e\u73b0<\/h1>\n<pre><code class=\"language-java\">import java.util.Random;\nclass Node {\n    int key, priority;\n    Node left, right;\n    Node(int key) {\n        this.key = key;\n        this.priority = new Random().nextInt(); \/\/ Assign random priority\n    }\n}\npublic class Treap {\n    Node root;\n    private Node leftRotate(Node node) {\n        Node newRoot = node.right;\n        node.right = newRoot.left;\n        newRoot.left = node;\n        return newRoot;\n    }\n    private Node rightRotate(Node node) {\n        Node newRoot = node.left;\n        node.left = newRoot.right;\n        newRoot.right = node;\n        return newRoot;\n    }\n    public Node insert(Node root, int key) {\n        if (root == null)\n            return new Node(key);\n        if (key &lt;= root.key) {\n            root.left = insert(root.left, key);\n            if (root.left.priority &gt; root.priority)\n                root = rightRotate(root);\n        } else {\n            root.right = insert(root.right, key);\n            if (root.right.priority &gt; root.priority)\n                root = leftRotate(root);\n        }\n        return root;\n    }\n    public void insert(int key) {\n        root = insert(root, key);\n    }\n    \/\/ In-order traversal for testing\n    private void inOrderTraversal(Node node) {\n        if (node != null) {\n            inOrderTraversal(node.left);\n            System.out.print(node.key + &quot; &quot;);\n            inOrderTraversal(node.right);\n        }\n    }\n    public void inOrderTraversal() {\n        inOrderTraversal(root);\n    }\n    public static void main(String[] args) {\n        Treap treap = new Treap();\n        int[] testData = {5, 3, 7, 2, 4, 6, 8};\n        for (int key : testData)\n            treap.insert(key);\n        treap.inOrderTraversal();\n    }\n}<\/code><\/pre>\n<h1>\u4f7f\u7528\u573a\u666f<\/h1>\n<p>\u4f18\u5148\u7ea7\u961f\u5217\uff1a Treap\u53ef\u4ee5\u7528\u4f5c\u4f18\u5148\u7ea7\u961f\u5217\uff0c\u5141\u8bb8\u4f60\u4ee5\u4e00\u79cd\u9ad8\u6548\u7684\u65b9\u5f0f\u63d2\u5165\u548c\u5220\u9664\u5177\u6709\u4e0d\u540c\u4f18\u5148\u7ea7\u7684\u5143\u7d20\u3002<\/p>\n<p>\u52a8\u6001\u4e2d\u4f4d\u6570\u67e5\u627e\uff1a \u5728\u4e00\u4e2a\u6570\u636e\u6d41\u4e2d\uff0cTreap\u53ef\u4ee5\u7528\u6765\u5b9e\u65f6\u67e5\u627e\u4e2d\u4f4d\u6570\uff0c\u56e0\u4e3a\u5b83\u7ef4\u62a4\u4e86\u6709\u5e8f\u6027\u548c\u4f18\u5148\u7ea7\u6027\u3002<\/p>\n<p>\u8303\u56f4\u67e5\u8be2\uff1a Treap\u5141\u8bb8\u9ad8\u6548\u5730\u6267\u884c\u8303\u56f4\u67e5\u8be2\uff0c\u5982\u67e5\u627e\u6240\u6709\u5728\u7ed9\u5b9a\u8303\u56f4\u5185\u7684\u5143\u7d20\u3002<\/p>\n<p>\u5e73\u8861\u6811\u66ff\u4ee3\uff1a \u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0cTreap\u53ef\u4ee5\u4f5c\u4e3a\u5e73\u8861\u6811\uff08\u5982AVL\u6811\u3001\u7ea2\u9ed1\u6811\uff09\u7684\u66ff\u4ee3\uff0c\u63d0\u4f9b\u8f83\u597d\u7684\u5e73\u8861\u6027\u80fd\u3002<\/p>\n<p>\u968f\u673a\u5316\u7b97\u6cd5\uff1a \u7531\u4e8eTreap\u7684\u4f18\u5148\u7ea7\u968f\u673a\u6027\uff0c\u5b83\u53ef\u4ee5\u7528\u4e8e\u8bbe\u8ba1\u968f\u673a\u5316\u7b97\u6cd5\u3002<\/p>\n<h1>\u4f18\u5148\u7ea7\u961f\u5217<\/h1>\n<pre><code class=\"language-java\">import java.util.Random;\nclass Node {\n    int key, priority;\n    Node left, right;\n    Node(int key) {\n        this.key = key;\n        this.priority = new Random().nextInt(); \/\/ Assign random priority\n    }\n}\npublic class TreapPriorityQueue {\n    Node root;\n    \/\/ ...\uff08\u7701\u7565\u63d2\u5165\u3001\u65cb\u8f6c\u7b49\u65b9\u6cd5\uff0c\u4e0e\u524d\u9762\u7684\u4ee3\u7801\u76f8\u540c\uff09\n    public int extractMax() {\n        if (root == null)\n            throw new IllegalStateException(&quot;Priority queue is empty&quot;);\n        int maxKey = root.key;\n        root = merge(root.left, root.right);\n        return maxKey;\n    }\n    public static void main(String[] args) {\n        TreapPriorityQueue pq = new TreapPriorityQueue();\n        pq.insert(5);\n        pq.insert(3);\n        pq.insert(7);\n        pq.insert(2);\n        pq.insert(4);\n        while (!pq.isEmpty()) {\n            System.out.println(&quot;Extracted max: &quot; + pq.extractMax());\n        }\n    }\n}<\/code><\/pre>\n<h1>\u52a8\u6001\u4e2d\u4f4d\u6570\u67e5\u627e<\/h1>\n<pre><code class=\"language-java\">\/\/ \u5728 TreapPriorityQueue \u7c7b\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u65b9\u6cd5\npublic int findMedian() {\n    if (root == null)\n        throw new IllegalStateException(&quot;Treap is empty&quot;);\n    int size = size(root.left) + 1;\n    if (size == (size(root) + 1) \/ 2)\n        return root.key;\n    else if (size &gt; (size(root) + 1) \/ 2)\n        return findMedian(root.left);\n    else\n        return findMedian(root.right);\n}\npublic static void main(String[] args) {\n    TreapPriorityQueue pq = new TreapPriorityQueue();\n    pq.insert(5);\n    pq.insert(3);\n    pq.insert(7);\n    pq.insert(2);\n    pq.insert(4);\n    pq.insert(6);\n    pq.insert(8);\n    System.out.println(&quot;Median: &quot; + pq.findMedian()); \/\/ Should output 5\n}<\/code><\/pre>\n<h1>\u8303\u56f4\u67e5\u8be2<\/h1>\n<pre><code class=\"language-java\">\/\/ \u5728 TreapPriorityQueue \u7c7b\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u65b9\u6cd5\npublic void rangeQuery(Node node, int low, int high) {\n    if (node == null)\n        return;\n    if (node.key &gt;= low &amp;&amp; node.key &lt;= high) {\n        System.out.print(node.key + &quot; &quot;);\n        rangeQuery(node.left, low, high);\n        rangeQuery(node.right, low, high);\n    } else if (node.key &lt; low)\n        rangeQuery(node.right, low, high);\n    else\n        rangeQuery(node.left, low, high);\n}\npublic void rangeQuery(int low, int high) {\n    rangeQuery(root, low, high);\n}\npublic static void main(String[] args) {\n    TreapPriorityQueue pq = new TreapPriorityQueue();\n    pq.insert(5);\n    pq.insert(3);\n    pq.insert(7);\n    pq.insert(2);\n    pq.insert(4);\n    pq.insert(6);\n    pq.insert(8);\n    System.out.print(&quot;Elements in range [4, 7]: &quot;);\n    pq.rangeQuery(4, 7); \/\/ Should output 5 4 6 7\n}<\/code><\/pre>\n<h1>\u5e73\u8861\u6811\u66ff\u4ee3<\/h1>\n<pre><code class=\"language-java\">\/\/ \u5728 TreapPriorityQueue \u7c7b\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u65b9\u6cd5\npublic int getHeight(Node node) {\n    if (node == null)\n        return 0;\n    return Math.max(getHeight(node.left), getHeight(node.right)) + 1;\n}\npublic boolean isBalanced() {\n    return isBalanced(root);\n}\nprivate boolean isBalanced(Node node) {\n    if (node == null)\n        return true;\n    int balanceFactor = getHeight(node.left) - getHeight(node.right);\n    return Math.abs(balanceFactor) &lt;= 1 &amp;&amp; isBalanced(node.left) &amp;&amp; isBalanced(node.right);\n}\npublic static void main(String[] args) {\n    TreapPriorityQueue pq = new TreapPriorityQueue();\n    pq.insert(5);\n    pq.insert(3);\n    pq.insert(7);\n    pq.insert(2);\n    pq.insert(4);\n    pq.insert(6);\n    pq.insert(8);\n    System.out.println(&quot;Is the Treap balanced? &quot; + pq.isBalanced()); \/\/ Should output true\n}<\/code><\/pre>\n<h1>\u968f\u673a\u5316\u7b97\u6cd5<\/h1>\n<pre><code class=\"language-java\">\/\/ \u5728 TreapPriorityQueue \u7c7b\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u65b9\u6cd5\npublic void shuffle() {\n    List&lt;Integer&gt; keys = new ArrayList&lt;&gt;();\n    inOrderTraversalToList(root, keys);\n    Collections.shuffle(keys);\n    root = null;\n    for (int key : keys) {\n        insert(key);\n    }\n}\nprivate void inOrderTraversalToList(Node node, List&lt;Integer&gt; list) {\n    if (node != null) {\n        inOrderTraversalToList(node.left, list);\n        list.add(node.key);\n        inOrderTraversalToList(node.right, list);\n    }\n}\npublic static void main(String[] args) {\n    TreapPriorityQueue pq = new TreapPriorityQueue();\n    pq.insert(5);\n    pq.insert(3);\n    pq.insert(7);\n    pq.insert(2);\n    pq.insert(4);\n    pq.insert(6);\n    pq.insert(8);\n    System.out.print(&quot;Original order: &quot;);\n    pq.inOrderTraversal(); \/\/ Should output ordered elements\n    pq.shuffle();\n    System.out.print(&quot;\\nShuffled order: &quot;);\n    pq.inOrderTraversal(); \/\/ Should output shuffled elements\n}\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 Treap\uff08\u6811\u5806\uff09\u662f\u4e00\u79cd\u6570\u636e\u7ed3\u6784\uff0c\u540c\u65f6\u5177\u6709\u4e8c\u53c9\u641c\u7d22\u6811\uff08BST\uff09\u548c\u6700\u5c0f\u5806\u7684\u7279\u6027\u3002\u5b83\u7684\u5b9e\u73b0\u76f8\u5bf9\u7b80\u5355\uff0c\u901a\u5e38\u7528\u4e8e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_mi_skip_tracking":false},"categories":[1],"tags":[],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Treap\u7684\u7406\u8bba\u4e0eJava\u4ee3\u7801\u5b9e\u73b0 - \u672c\u7f51\u7ad9\u5206\u4eab\u7f16\u7a0b\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u7684bug<\/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:\/\/zhaocunwei.co.uk\/index.php\/2023\/08\/10\/treap\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Treap\u7684\u7406\u8bba\u4e0eJava\u4ee3\u7801\u5b9e\u73b0 - \u672c\u7f51\u7ad9\u5206\u4eab\u7f16\u7a0b\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u7684bug\" \/>\n<meta property=\"og:description\" content=\"\u524d\u8a00 Treap\uff08\u6811\u5806\uff09\u662f\u4e00\u79cd\u6570\u636e\u7ed3\u6784\uff0c\u540c\u65f6\u5177\u6709\u4e8c\u53c9\u641c\u7d22\u6811\uff08BST\uff09\u548c\u6700\u5c0f\u5806\u7684\u7279\u6027\u3002\u5b83\u7684\u5b9e\u73b0\u76f8\u5bf9\u7b80\u5355\uff0c\u901a\u5e38\u7528\u4e8e [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/zhaocunwei.co.uk\/index.php\/2023\/08\/10\/treap\/\" \/>\n<meta property=\"og:site_name\" content=\"\u672c\u7f51\u7ad9\u5206\u4eab\u7f16\u7a0b\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u7684bug\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-10T01:59:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-10T02:22:12+00:00\" \/>\n<meta name=\"author\" content=\"\u603b\u662f\u5e78\u798f\u7684\u8001\u8c4c\u8c46\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u603b\u662f\u5e78\u798f\u7684\u8001\u8c4c\u8c46\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/zhaocunwei.co.uk\/index.php\/2023\/08\/10\/treap\/\",\"url\":\"https:\/\/zhaocunwei.co.uk\/index.php\/2023\/08\/10\/treap\/\",\"name\":\"Treap\u7684\u7406\u8bba\u4e0eJava\u4ee3\u7801\u5b9e\u73b0 - \u672c\u7f51\u7ad9\u5206\u4eab\u7f16\u7a0b\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u7684bug\",\"isPartOf\":{\"@id\":\"https:\/\/zhaocunwei.co.uk\/#website\"},\"datePublished\":\"2023-08-10T01:59:15+00:00\",\"dateModified\":\"2023-08-10T02:22:12+00:00\",\"author\":{\"@id\":\"https:\/\/zhaocunwei.co.uk\/#\/schema\/person\/dfb1dc0fc4a330c41908d477cd99c0b4\"},\"breadcrumb\":{\"@id\":\"https:\/\/zhaocunwei.co.uk\/index.php\/2023\/08\/10\/treap\/#breadcrumb\"},\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/zhaocunwei.co.uk\/index.php\/2023\/08\/10\/treap\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/zhaocunwei.co.uk\/index.php\/2023\/08\/10\/treap\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/zhaocunwei.co.uk\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Treap\u7684\u7406\u8bba\u4e0eJava\u4ee3\u7801\u5b9e\u73b0\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/zhaocunwei.co.uk\/#website\",\"url\":\"https:\/\/zhaocunwei.co.uk\/\",\"name\":\"\u672c\u7f51\u7ad9\u5206\u4eab\u7f16\u7a0b\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u7684bug\",\"description\":\"This site shares programming bugs\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/zhaocunwei.co.uk\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-CN\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/zhaocunwei.co.uk\/#\/schema\/person\/dfb1dc0fc4a330c41908d477cd99c0b4\",\"name\":\"\u603b\u662f\u5e78\u798f\u7684\u8001\u8c4c\u8c46\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-CN\",\"@id\":\"https:\/\/zhaocunwei.co.uk\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4226cc1ca6640507df1d2d4ba3da7a62?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4226cc1ca6640507df1d2d4ba3da7a62?s=96&d=mm&r=g\",\"caption\":\"\u603b\u662f\u5e78\u798f\u7684\u8001\u8c4c\u8c46\"},\"sameAs\":[\"http:\/\/zhaocunwei.co.uk\"],\"url\":\"https:\/\/zhaocunwei.co.uk\/index.php\/author\/18500103508163-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Treap\u7684\u7406\u8bba\u4e0eJava\u4ee3\u7801\u5b9e\u73b0 - \u672c\u7f51\u7ad9\u5206\u4eab\u7f16\u7a0b\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u7684bug","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:\/\/zhaocunwei.co.uk\/index.php\/2023\/08\/10\/treap\/","og_locale":"zh_CN","og_type":"article","og_title":"Treap\u7684\u7406\u8bba\u4e0eJava\u4ee3\u7801\u5b9e\u73b0 - \u672c\u7f51\u7ad9\u5206\u4eab\u7f16\u7a0b\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u7684bug","og_description":"\u524d\u8a00 Treap\uff08\u6811\u5806\uff09\u662f\u4e00\u79cd\u6570\u636e\u7ed3\u6784\uff0c\u540c\u65f6\u5177\u6709\u4e8c\u53c9\u641c\u7d22\u6811\uff08BST\uff09\u548c\u6700\u5c0f\u5806\u7684\u7279\u6027\u3002\u5b83\u7684\u5b9e\u73b0\u76f8\u5bf9\u7b80\u5355\uff0c\u901a\u5e38\u7528\u4e8e [&hellip;]","og_url":"https:\/\/zhaocunwei.co.uk\/index.php\/2023\/08\/10\/treap\/","og_site_name":"\u672c\u7f51\u7ad9\u5206\u4eab\u7f16\u7a0b\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u7684bug","article_published_time":"2023-08-10T01:59:15+00:00","article_modified_time":"2023-08-10T02:22:12+00:00","author":"\u603b\u662f\u5e78\u798f\u7684\u8001\u8c4c\u8c46","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u603b\u662f\u5e78\u798f\u7684\u8001\u8c4c\u8c46","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/zhaocunwei.co.uk\/index.php\/2023\/08\/10\/treap\/","url":"https:\/\/zhaocunwei.co.uk\/index.php\/2023\/08\/10\/treap\/","name":"Treap\u7684\u7406\u8bba\u4e0eJava\u4ee3\u7801\u5b9e\u73b0 - \u672c\u7f51\u7ad9\u5206\u4eab\u7f16\u7a0b\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u7684bug","isPartOf":{"@id":"https:\/\/zhaocunwei.co.uk\/#website"},"datePublished":"2023-08-10T01:59:15+00:00","dateModified":"2023-08-10T02:22:12+00:00","author":{"@id":"https:\/\/zhaocunwei.co.uk\/#\/schema\/person\/dfb1dc0fc4a330c41908d477cd99c0b4"},"breadcrumb":{"@id":"https:\/\/zhaocunwei.co.uk\/index.php\/2023\/08\/10\/treap\/#breadcrumb"},"inLanguage":"zh-CN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zhaocunwei.co.uk\/index.php\/2023\/08\/10\/treap\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/zhaocunwei.co.uk\/index.php\/2023\/08\/10\/treap\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/zhaocunwei.co.uk\/"},{"@type":"ListItem","position":2,"name":"Treap\u7684\u7406\u8bba\u4e0eJava\u4ee3\u7801\u5b9e\u73b0"}]},{"@type":"WebSite","@id":"https:\/\/zhaocunwei.co.uk\/#website","url":"https:\/\/zhaocunwei.co.uk\/","name":"\u672c\u7f51\u7ad9\u5206\u4eab\u7f16\u7a0b\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u7684bug","description":"This site shares programming bugs","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zhaocunwei.co.uk\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-CN"},{"@type":"Person","@id":"https:\/\/zhaocunwei.co.uk\/#\/schema\/person\/dfb1dc0fc4a330c41908d477cd99c0b4","name":"\u603b\u662f\u5e78\u798f\u7684\u8001\u8c4c\u8c46","image":{"@type":"ImageObject","inLanguage":"zh-CN","@id":"https:\/\/zhaocunwei.co.uk\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4226cc1ca6640507df1d2d4ba3da7a62?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4226cc1ca6640507df1d2d4ba3da7a62?s=96&d=mm&r=g","caption":"\u603b\u662f\u5e78\u798f\u7684\u8001\u8c4c\u8c46"},"sameAs":["http:\/\/zhaocunwei.co.uk"],"url":"https:\/\/zhaocunwei.co.uk\/index.php\/author\/18500103508163-com\/"}]}},"_links":{"self":[{"href":"https:\/\/zhaocunwei.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/775"}],"collection":[{"href":"https:\/\/zhaocunwei.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zhaocunwei.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zhaocunwei.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zhaocunwei.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=775"}],"version-history":[{"count":1,"href":"https:\/\/zhaocunwei.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/775\/revisions"}],"predecessor-version":[{"id":776,"href":"https:\/\/zhaocunwei.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/775\/revisions\/776"}],"wp:attachment":[{"href":"https:\/\/zhaocunwei.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zhaocunwei.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=775"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zhaocunwei.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}