{"id":3794,"date":"2021-08-10T13:59:48","date_gmt":"2021-08-10T13:59:48","guid":{"rendered":"https:\/\/www.prepbytes.com\/blog\/?p=3794"},"modified":"2024-07-01T10:12:21","modified_gmt":"2024-07-01T10:12:21","slug":"identical-linked-lists","status":"publish","type":"post","link":"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/","title":{"rendered":"Identical Linked Lists"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1644911089428-Identical%20Linked%20List_Artboard%201.png\" alt=\"\" \/><\/p>\n<p>Linked lists are a fundamental data structure in computer science, frequently used to store collections of elements. Unlike arrays, linked lists provide dynamic memory allocation and efficient insertions and deletions. Understanding and manipulating linked lists is crucial for solving various computational problems. One common task is determining whether two linked lists are identical. Identical linked lists are those that contain the same sequence of elements in the same order. This article delves into the concept of identical linked lists, explaining their significance, the methodology for comparison, and frequently asked questions related to their identification and usage.<\/p>\n<h2>How To Check Two Linked Lists Are Equal<\/h2>\n<p>In this problem, we are given two LinkedList and are asked to find if the linked lists are identical or not i.e. we have to find whether the two linked lists have the same arrangement of the values of the nodes in them or not.<\/p>\n<p><strong>Linked list 1:<\/strong> <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/prepbytes.com\/blog\/wp-content\/uploads\/2021\/08\/55_1-01.png\" alt=\"\" \/><\/p>\n<p><strong>Linked List 2:<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/prepbytes.com\/blog\/wp-content\/uploads\/2021\/08\/55_1-01.png\" alt=\"\" \/><\/p>\n<p><strong>Output:<\/strong> Identical<br \/>\nThese two LinkedList are identical.<\/p>\n<p>Let&#8217;s first understand the problem statement with the help of an example:<\/p>\n<p>If <strong>Linked list 1<\/strong> = 3\u21925\u21927 and <strong>Linked list 2<\/strong> = 3\u21925\u21927.<br \/>\nThe term &#8216;arrangement of the values of the nodes in a linked list&#8217; which we have referred to in the problem statement means that if our linked list is 5\u21926\u21927\u21928\u21929, then the arrangement of the values of the nodes in the linked list is 5,6,7,8,9.<\/p>\n<ul>\n<li>From the Linked list 1 we can see that its arrangement of the values of the nodes is 3,5,7.<\/li>\n<li>From the Linked list 2 we can see that its arrangement of the values of the nodes is 3,5,7.<\/li>\n<\/ul>\n<p>Since both the linked list have the same arrangement of the values of the nodes, so the above linked list 1 and 2 are <strong>Identical<\/strong>.<\/p>\n<p>If <strong>Linked list 1<\/strong> = 3\u21925\u21926 and <strong>Linked list 2<\/strong> = 3\u21926\u21925.<\/p>\n<ul>\n<li>From the Linked list 1 we can see that its arrangement of the values of the nodes is 3,5,6.<\/li>\n<li>From the Linked list 2 we can see that its arrangement of the values of the nodes is 3,6,5.<\/li>\n<\/ul>\n<p>Since both the linked list have a different arrangement of the values of the nodes, so the above linked list 1 and 2 are <strong>Not Identical<\/strong>.<\/p>\n<p>Now, I think from the above examples, it is clear what we are trying to find in this problem. So next we will try to think about how we can approach this problem.<\/p>\n<p>Before jumping to the next section of the blog, try to think about how you can solve this problem?<\/p>\n<h2>Approach on How To Check Two Linked Lists Are Equal<\/h2>\n<p>The basic approach which comes to mind is to traverse both the linked list simultaneously and check if at any iteration:<\/p>\n<ul>\n<li>The values of the lists are different then we return false.<\/li>\n<\/ul>\n<p>Else if we reach the end of both the lists at the same time while traversing then only we return true. <\/p>\n<p><strong>Note:<\/strong> If we reach the end in only one list that means their size is different and hence also not identical.<\/p>\n<h2>Algorithm on How To Check Two Linked Lists Are Equal<\/h2>\n<ul>\n<li>Start traversing the linked lists x and y.<\/li>\n<li>If at any point while traversing, the data is different in the two lists (<strong>x-&gt;data != y-&gt;data<\/strong>), then we return false.<\/li>\n<li>If we reach the end of both the linked list at the same time, then we return true.<\/li>\n<li>If we reach the end of any one of the lists then they are not identical and return false.<\/li>\n<\/ul>\n<h3>Dry Run on How To Check Two Linked Lists Are Equal<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/prepbytes.com\/blog\/wp-content\/uploads\/2021\/08\/55_3-01.png\" alt=\"\" \/><\/p>\n<h2>Code Implementation on How To Check Two Linked Lists Are Equal<\/h2>\n\t\t\t\t\t\t<style>\r\n\t\t\t\t\r\n\t\t\t\t\t#tab_container_3797 {\r\n\toverflow:hidden;\r\n\tdisplay:block;\r\n\twidth:100%;\r\n\tborder:0px solid #ddd;\r\n\tmargin-bottom:30px;\r\n\t}\r\n\r\n#tab_container_3797 .tab-content{\r\n\tpadding:20px;\r\n\tborder: 1px solid #e6e6e6 !important;\r\n\tmargin-top: 0px;\r\n\tbackground-color:#ffffff !important;\r\n\tcolor: #000000 !important;\r\n\tfont-size:16px !important;\r\n\tfont-family: Open Sans !important;\r\n\t\r\n\t\tborder: 1px solid #e6e6e6 !important;\r\n\t}\r\n#tab_container_3797 .wpsm_nav-tabs {\r\n    border-bottom: 0px solid #ddd;\r\n}\r\n#tab_container_3797 .wpsm_nav-tabs > li.active > a, #tab_container_3797 .wpsm_nav-tabs > li.active > a:hover, #tab_container_3797 .wpsm_nav-tabs > li.active > a:focus {\r\n\tcolor: #000000 !important;\r\n\tcursor: default;\r\n\tbackground-color: #ffffff !important;\r\n\tborder: 1px solid #e6e6e6 !important;\r\n}\r\n\r\n#tab_container_3797 .wpsm_nav-tabs > li > a {\r\n    margin-right: 0px !important; \r\n    line-height: 1.42857143 !important;\r\n    border: 1px solid #d5d5d5 !important;\r\n    border-radius: 0px 0px 0 0 !important; \r\n\tbackground-color: #e8e8e8 !important;\r\n\tcolor: #000000 !important;\r\n\tpadding: 15px 18px 15px 18px !important;\r\n\ttext-decoration: none !important;\r\n\tfont-size: 14px !important;\r\n\ttext-align:center !important;\r\n\tfont-family: Open Sans !important;\r\n}\r\n#tab_container_3797 .wpsm_nav-tabs > li > a:focus {\r\noutline: 0px !important;\r\n}\r\n\r\n#tab_container_3797 .wpsm_nav-tabs > li > a:before {\r\n\tdisplay:none !important;\r\n}\r\n#tab_container_3797 .wpsm_nav-tabs > li > a:after {\r\n\tdisplay:none !important ;\r\n}\r\n#tab_container_3797 .wpsm_nav-tabs > li{\r\npadding:0px !important ;\r\nmargin:0px;\r\n}\r\n\r\n#tab_container_3797 .wpsm_nav-tabs > li > a:hover , #tab_container_3797 .wpsm_nav-tabs > li > a:focus {\r\n    color: #000000 !important;\r\n    background-color: #e8e8e8 !important;\r\n\tborder: 1px solid #d5d5d5 !important;\r\n\t\r\n}\r\n#tab_container_3797 .wpsm_nav-tabs > li > a .fa{\r\n\r\nmargin-right:5px !important;\r\n\r\nmargin-left:5px !important;\r\n\r\n\r\n}\r\n\r\n\t\t#tab_container_3797 .wpsm_nav-tabs a{\r\n\t\t\tbackground-image: none;\r\n\t\t\tbackground-position: 0 0;\r\n\t\t\tbackground-repeat: repeat-x;\r\n\t\t}\r\n\t\t\t\r\n\r\n\r\n#tab_container_3797 .wpsm_nav-tabs > li {\r\n    float: left;\r\n    margin-bottom: -1px !important;\r\n\tmargin-right:0px !important; \r\n}\r\n\r\n\r\n#tab_container_3797 .tab-content{\r\noverflow:hidden !important;\r\n}\r\n\r\n\r\n@media (min-width: 769px) {\r\n\r\n\t#tab_container_3797 .wpsm_nav-tabs > li{\r\n\t\tfloat:left !important ;\r\n\t\t\t\tmargin-right:-1px !important;\r\n\t\t\t\t\t}\r\n\t#tab_container_3797 .wpsm_nav-tabs{\r\n\t\tfloat:none !important;\r\n\t\tmargin:0px !important;\r\n\t}\r\n\r\n\t#tab_container_3797 .wpsm_nav-tabs > li {\r\n\t\t\t\t\r\n\t}\r\n\t#tab_container_3797 .wpsm_nav{\r\n\t\t\t}\r\n\r\n}\r\n\r\n\r\n\r\n@media (max-width: 768px) {\r\n\t#tab_container_3797 .wpsm_nav-tabs > li {\r\n\t\t\t\t\r\n\t}\r\n\t#tab_container_3797 .wpsm_nav{\r\n\t\t\t}\r\n}\r\n\r\n\r\n\t.wpsm_nav-tabs li:before{\r\n\t\tdisplay:none !important;\r\n\t}\r\n\r\n\t@media (max-width: 768px) {\r\n\t\t\t\t\r\n\t\t\t\t.wpsm_nav-tabs{\r\n\t\t\tmargin-left:0px !important;\r\n\t\t\tmargin-right:0px !important; \r\n\t\t\t\r\n\t\t}\r\n\t\t\t\t#tab_container_3797 .wpsm_nav-tabs > li{\r\n\t\t\tfloat:none !important;\r\n\t\t}\r\n\t\t\t\r\n\t}\t\t\t\t<\/style>\r\n\t\t\t\t<div id=\"tab_container_3797\" >\r\n\t \r\n\t\t\t\t\t<ul class=\"wpsm_nav wpsm_nav-tabs\" role=\"tablist\" id=\"myTab_3797\">\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<li role=\"presentation\"  class=\"active\"  onclick=\"do_resize()\">\r\n\t\t\t\t\t\t\t\t<a href=\"#tabs_desc_3797_1\" aria-controls=\"tabs_desc_3797_1\" role=\"tab\" data-toggle=\"tab\">\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-code\"><\/i> \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t<span>C<\/span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\t\t<\/li>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<li role=\"presentation\"  onclick=\"do_resize()\">\r\n\t\t\t\t\t\t\t\t<a href=\"#tabs_desc_3797_2\" aria-controls=\"tabs_desc_3797_2\" role=\"tab\" data-toggle=\"tab\">\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-code\"><\/i> \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t<span>C++<\/span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\t\t<\/li>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<li role=\"presentation\"  onclick=\"do_resize()\">\r\n\t\t\t\t\t\t\t\t<a href=\"#tabs_desc_3797_3\" aria-controls=\"tabs_desc_3797_3\" role=\"tab\" data-toggle=\"tab\">\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-code\"><\/i> \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t<span>Java<\/span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\t\t<\/li>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<li role=\"presentation\"  onclick=\"do_resize()\">\r\n\t\t\t\t\t\t\t\t<a href=\"#tabs_desc_3797_4\" aria-controls=\"tabs_desc_3797_4\" role=\"tab\" data-toggle=\"tab\">\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"fa fa-code\"><\/i> \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t<span>Python<\/span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\t\t<\/li>\r\n\t\t\t\t\t\t\t\t\t\t\t <\/ul>\r\n\r\n\t\t\t\t\t  <!-- Tab panes -->\r\n\t\t\t\t\t  <div class=\"tab-content\" id=\"tab-content_3797\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t <div role=\"tabpanel\" class=\"tab-pane  in active \" id=\"tabs_desc_3797_1\">\r\n\t\t\t\t\t\t\t\t<!-- wp:enlighter\/codeblock {\"language\":\"c\"} -->\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"c\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\r\n#include&lt;stdio.h&gt;\r\n#include&lt;stdlib.h&gt;\r\n#include&lt;stdbool.h&gt;\r\n \r\n\/* Structure for a linked list node *\/\r\nstruct Node\r\n{\r\n    int data;\r\n    struct Node *next;\r\n};\r\n \r\n\/* Returns true if linked lists a and b are identical,\r\n   otherwise false *\/\r\nbool areIdentical(struct Node *a, struct Node *b)\r\n{\r\n    while (a != NULL &amp;&amp; b != NULL)\r\n    {\r\n        if (a-&gt;data != b-&gt;data)\r\n            return false;\r\n \r\n        \/* If we reach here, then a and b are not NULL and\r\n           their data is same, so move to next nodes in both\r\n           lists *\/\r\n        a = a-&gt;next;\r\n        b = b-&gt;next;\r\n    }\r\n \r\n    \/\/ If linked lists are identical, then 'a' and 'b' must\r\n    \/\/ be NULL at this point.\r\n    return (a == NULL &amp;&amp; b == NULL);\r\n}\r\n \r\n\/* UTILITY FUNCTIONS TO TEST fun1() and fun2() *\/\r\n\/* Given a reference (pointer to pointer) to the head\r\n  of a list and an int, push a new node on the front\r\n  of the list. *\/\r\nvoid push(struct Node** head_ref, int new_data)\r\n{\r\n    \/* allocate node *\/\r\n    struct Node* new_node =\r\n        (struct Node*) malloc(sizeof(struct Node));\r\n \r\n    \/* put in the data  *\/\r\n    new_node-&gt;data  = new_data;\r\n \r\n    \/* link the old list off the new node *\/\r\n    new_node-&gt;next = (*head_ref);\r\n \r\n    \/* move the head to point to the new node *\/\r\n    (*head_ref)    = new_node;\r\n}\r\n \r\n\/* Driver program to test above function *\/\r\nint main()\r\n{\r\n    \/* The constructed linked lists are :\r\n     a: 3-&gt;2-&gt;1\r\n     b: 3-&gt;2-&gt;1 *\/\r\n    struct Node *a = NULL;\r\n    struct Node *b = NULL;\r\n    push(&amp;a, 1);\r\n    push(&amp;a, 2);\r\n    push(&amp;a, 3);\r\n    push(&amp;b, 1);\r\n    push(&amp;b, 2);\r\n    push(&amp;b, 3);\r\n \r\n    areIdentical(a, b)? printf(&quot;Identical&quot;):\r\n                        printf(&quot;Not identical&quot;);\r\n \r\n    return 0;\r\n}\r\n<\/pre>\r\n<!-- \/wp:enlighter\/codeblock -->\t\t\t\t\t\t <\/div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t <div role=\"tabpanel\" class=\"tab-pane \" id=\"tabs_desc_3797_2\">\r\n\t\t\t\t\t\t\t\t<!-- wp:enlighter\/codeblock {\"language\":\"cpp\"} -->\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"cpp\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\r\n#include&lt;bits stdc++.h=&quot;&quot;&gt;\r\nusing namespace std;\r\nstruct Node\r\n{\r\n    int data;\r\n    struct Node *next;\r\n};\r\nbool areIdentical(struct Node *x,struct Node *y)\r\n{\r\n    while (x != NULL &amp;&amp; y != NULL)\r\n    {\r\n        if (x-&gt;data != y-&gt;data)\r\n            return false;\r\n\r\n        x = x-&gt;next;\r\n        y = y-&gt;next;\r\n    }\r\n    return (x == NULL &amp;&amp; y == NULL);\r\n}\r\nvoid push(struct Node** head_ref, int new_data)\r\n{\r\n    struct Node* new_node = new Node();\r\n    new_node-&gt;data = new_data;\r\n    new_node-&gt;next = (*head_ref);\r\n    (*head_ref) = new_node;\r\n}\r\nint main()\r\n{\r\n    struct Node *x = NULL;\r\n    struct Node *y = NULL;\r\n    push(&amp;x, 7);\r\n    push(&amp;x, 5);\r\n    push(&amp;x, 3);\r\n    push(&amp;y, 7);\r\n    push(&amp;y, 5);\r\n    push(&amp;y, 3);\r\n    if(areIdentical(x, y))\r\n        cout &lt;&lt; &quot;Identical&quot;;\r\n    else\r\n        cout &lt;&lt; &quot;Not identical&quot;;\r\n    return 0;\r\n}\r\n\r\n\r\n<\/pre>\r\n<!-- \/wp:enlighter\/codeblock -->\r\n\t\t\t\t\t\t <\/div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t <div role=\"tabpanel\" class=\"tab-pane \" id=\"tabs_desc_3797_3\">\r\n\t\t\t\t\t\t\t\t<!-- wp:enlighter\/codeblock {\"language\":\"Java\"} -->\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"Java\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\r\nclass Identical\r\n{\r\n    Node head; \r\n    class Node\r\n    {\r\n        int data;\r\n        Node next;\r\n        Node(int d) { data = d; next = null; }\r\n    }\r\n\r\n    \/* Returns true if linked lists a and b are identical,\r\n    otherwise false *\/\r\n    boolean areIdentical(Identical llist2)\r\n    {\r\n        Node a = this.head, b = llist2.head;\r\n        while (a != null &amp;&amp; b != null)\r\n        {\r\n            if (a.data != b.data)\r\n                return false;\r\n\r\n            \/* If we reach here, then a and b are not null\r\n            and their data is same, so move to next nodes\r\n            in both lists *\/\r\n            a = a.next;\r\n            b = b.next;\r\n        }\r\n\r\n        \/\/ If linked lists are identical, then 'a' and 'b' must\r\n        \/\/ be null at this point.\r\n        return (a == null &amp;&amp; b == null);\r\n    }\r\n    void push(int new_data)\r\n    {\r\n        Node new_node = new Node(new_data);\r\n        new_node.next = head;\r\n        head = new_node;\r\n    }\r\n    \/* Driver program to test above functions *\/\r\n    public static void main(String args[])\r\n    {\r\n        Identical llist1=new Identical();\r\n        Identical llist2=new Identical();\r\n\r\n        \/* The constructed linked lists are :\r\n        llist1: 3-&gt;2-&gt;1\r\n        llist2: 3-&gt;2-&gt;1 *\/\r\n\r\n        llist1.push(1);\r\n        llist1.push(2);\r\n        llist1.push(3);\r\n\r\n        llist2.push(1);\r\n        llist2.push(2);\r\n        llist2.push(3);\r\n\r\n        if (llist1.areIdentical(llist2) == true)\r\n            System.out.println(&quot;Identical &quot;);\r\n        else\r\n            System.out.println(&quot;Not identical &quot;);\r\n\r\n    }\r\n} \r\n<\/pre>\r\n<!-- \/wp:enlighter\/codeblock -->\t\t\t\t\t\t <\/div>\r\n\t\t\t\t\t\t\t\t\t\t\t\t <div role=\"tabpanel\" class=\"tab-pane \" id=\"tabs_desc_3797_4\">\r\n\t\t\t\t\t\t\t\t<!-- wp:enlighter\/codeblock {\"language\":\"Python\"} -->\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"Python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\r\nclass Node:\r\n    def __init__(self, d):\r\n        self.data = d\r\n        self.next = None\r\n\r\nclass LinkedList:\r\n    def __init__(self):\r\n        self.head = None\r\n\r\n    def areIdentical(self, listb):\r\n        a = self.head\r\n        b = listb.head\r\n        while (a != None and b != None):\r\n\r\n            if (a.data != b.data):\r\n                return False\r\n\r\n            a = a.next\r\n            b = b.next\r\n\r\n        return (a == None and b == None)\r\n\r\n    def push(self, new_data):\r\n        \r\n        new_node = Node(new_data)\r\n        new_node.next = self.head\r\n        self.head = new_node\r\n\r\nllist1 = LinkedList()\r\nllist2 = LinkedList()\r\n\r\nllist1.push(7)\r\nllist1.push(5)\r\nllist1.push(3)\r\nllist2.push(7)\r\nllist2.push(5)\r\nllist2.push(3)\r\n\r\nif (llist1.areIdentical(llist2) == True):\r\n    print(&quot;Identical &quot;)\r\nelse:\r\n    print(&quot;Not identical &quot;)\r\n<\/pre>\r\n<!-- \/wp:enlighter\/codeblock -->\t\t\t\t\t\t <\/div>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t <\/div>\r\n\t\t\t\t\t \r\n\t\t\t\t <\/div>\r\n <script>\r\n\t\tjQuery(function () {\r\n\t\t\tjQuery('#myTab_3797 a:first').tab('show')\r\n\t\t});\r\n\t\t\r\n\t\t\t\tjQuery(function(){\r\n\t\t\tvar b=\"fadeIn\";\r\n\t\t\tvar c;\r\n\t\t\tvar a;\r\n\t\t\td(jQuery(\"#myTab_3797 a\"),jQuery(\"#tab-content_3797\"));function d(e,f,g){\r\n\t\t\t\te.click(function(i){\r\n\t\t\t\t\ti.preventDefault();\r\n\t\t\t\t\tjQuery(this).tab(\"show\");\r\n\t\t\t\t\tvar h=jQuery(this).data(\"easein\");\r\n\t\t\t\t\tif(c){c.removeClass(a);}\r\n\t\t\t\t\tif(h){f.find(\"div.active\").addClass(\"animated \"+h);a=h;}\r\n\t\t\t\t\telse{if(g){f.find(\"div.active\").addClass(\"animated \"+g);a=g;}else{f.find(\"div.active\").addClass(\"animated \"+b);a=b;}}c=f.find(\"div.active\");\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\r\n\t\tfunction do_resize(){\r\n\r\n\t\t\tvar width=jQuery( '.tab-content .tab-pane iframe' ).width();\r\n\t\t\tvar height=jQuery( '.tab-content .tab-pane iframe' ).height();\r\n\r\n\t\t\tvar toggleSize = true;\r\n\t\t\tjQuery('iframe').animate({\r\n\t\t\t    width: toggleSize ? width : 640,\r\n\t\t\t    height: toggleSize ? height : 360\r\n\t\t\t  }, 250);\r\n\r\n\t\t\t  toggleSize = !toggleSize;\r\n\t\t}\r\n\r\n\r\n\t<\/script>\r\n\t\t\t\t\r\n\t\t\t\n<pre><code>Output\nIdentical<\/code><\/pre>\n<p><strong>Time Complexity of Finding identical linked lists:<\/strong> O(min(m,n)), where m,n are the size of the linked lists.<\/p>\n<p><strong>Space Complexity of Finding identical linked lists:<\/strong> O(1), no extra space is used.<\/p>\n<p><strong>Conclusion<\/strong><br \/>\nIdentical linked lists represent a critical concept in understanding and working with linked lists. By ensuring that two linked lists contain the same elements in the same order, we can validate data integrity and perform efficient comparisons. Whether in algorithm design, data processing, or application development, the ability to determine identical linked lists is a valuable skill for any programmer. Through a clear methodology and understanding of common questions, you can effectively identify and utilize identical linked lists in your computational tasks.<\/p>\n<h2>FAQ related to Identical Linked Lists<\/h2>\n<p>Here are some FAQs related to Identical Linked Lists:<\/p>\n<p><strong>1. What is a linked list?<br \/>\nAnswer:<\/strong> A linked list is a data structure consisting of a sequence of elements, each containing a reference (or link) to the next element in the sequence. It allows for efficient insertions and deletions but requires sequential access for element retrieval.<\/p>\n<p><strong>2. How do you define identical linked lists?<br \/>\nAnswer:<\/strong> Two linked lists are considered identical if they contain the same number of elements, and each corresponding element in the lists is equal.<\/p>\n<p><strong>3. Why is it important to determine if two linked lists are identical?<br \/>\nAnswer:<\/strong> Determining if two linked lists are identical is important for tasks that require data validation, comparison operations, and ensuring data integrity in applications that use linked lists.<\/p>\n<p><strong>4. What is the basic approach to check if two linked lists are identical?<br \/>\nAnswer:<\/strong> The basic approach involves traversing both linked lists simultaneously and comparing each corresponding node. If all nodes match and both lists reach their end together, the lists are identical.<\/p>\n<p><strong>5. What are the potential challenges in comparing linked lists for identical elements?<br \/>\nAnswer:<\/strong> Challenges include handling different lengths of linked lists, ensuring efficient traversal without excessive time complexity, and managing edge cases such as empty lists or lists with complex data types.<\/p>\n<p><strong>6. Can identical linked lists have different memory addresses for their nodes?<br \/>\nAnswer:<\/strong> Yes, identical linked lists can have nodes stored at different memory addresses as long as the data values and their order in the lists are the same.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linked lists are a fundamental data structure in computer science, frequently used to store collections of elements. Unlike arrays, linked lists provide dynamic memory allocation and efficient insertions and deletions. Understanding and manipulating linked lists is crucial for solving various computational problems. One common task is determining whether two linked lists are identical. Identical linked [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[125],"tags":[],"class_list":["post-3794","post","type-post","status-publish","format-standard","hentry","category-linked-list"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Find Identical and non Identical Linked Lists in C++ | Linked List | Prepbytes<\/title>\n<meta name=\"description\" content=\"Given the root nodes of two LinkedList, you have to check whether these two linked lists have the same arrangement of data or not.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Find Identical and non Identical Linked Lists in C++ | Linked List | Prepbytes\" \/>\n<meta property=\"og:description\" content=\"Given the root nodes of two LinkedList, you have to check whether these two linked lists have the same arrangement of data or not.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/\" \/>\n<meta property=\"og:site_name\" content=\"PrepBytes Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prepbytes0211\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-10T13:59:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-01T10:12:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1644911089428-Identical%20Linked%20List_Artboard%201.png\" \/>\n<meta name=\"author\" content=\"PrepBytes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"PrepBytes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/\"},\"author\":{\"name\":\"PrepBytes\",\"@id\":\"http:\/\/43.205.93.38\/#\/schema\/person\/39fcf072e04987f16796546f2ca83c2e\"},\"headline\":\"Identical Linked Lists\",\"datePublished\":\"2021-08-10T13:59:48+00:00\",\"dateModified\":\"2024-07-01T10:12:21+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/\"},\"wordCount\":960,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/43.205.93.38\/#organization\"},\"image\":{\"@id\":\"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1644911089428-Identical%20Linked%20List_Artboard%201.png\",\"articleSection\":[\"Linked list articles\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/\",\"url\":\"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/\",\"name\":\"Find Identical and non Identical Linked Lists in C++ | Linked List | Prepbytes\",\"isPartOf\":{\"@id\":\"http:\/\/43.205.93.38\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1644911089428-Identical%20Linked%20List_Artboard%201.png\",\"datePublished\":\"2021-08-10T13:59:48+00:00\",\"dateModified\":\"2024-07-01T10:12:21+00:00\",\"description\":\"Given the root nodes of two LinkedList, you have to check whether these two linked lists have the same arrangement of data or not.\",\"breadcrumb\":{\"@id\":\"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/#primaryimage\",\"url\":\"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1644911089428-Identical%20Linked%20List_Artboard%201.png\",\"contentUrl\":\"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1644911089428-Identical%20Linked%20List_Artboard%201.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/43.205.93.38\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linked list articles\",\"item\":\"https:\/\/prepbytes.com\/blog\/category\/linked-list\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Identical Linked Lists\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/43.205.93.38\/#website\",\"url\":\"http:\/\/43.205.93.38\/\",\"name\":\"PrepBytes Blog\",\"description\":\"ONE-STOP RESOURCE FOR EVERYTHING RELATED TO CODING\",\"publisher\":{\"@id\":\"http:\/\/43.205.93.38\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/43.205.93.38\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"http:\/\/43.205.93.38\/#organization\",\"name\":\"Prepbytes\",\"url\":\"http:\/\/43.205.93.38\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/43.205.93.38\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/blog.prepbytes.com\/wp-content\/uploads\/2025\/07\/uzxxllgloialmn9mhwfe.webp\",\"contentUrl\":\"https:\/\/blog.prepbytes.com\/wp-content\/uploads\/2025\/07\/uzxxllgloialmn9mhwfe.webp\",\"width\":160,\"height\":160,\"caption\":\"Prepbytes\"},\"image\":{\"@id\":\"http:\/\/43.205.93.38\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/prepbytes0211\/\",\"https:\/\/www.instagram.com\/prepbytes\/\",\"https:\/\/www.linkedin.com\/company\/prepbytes\/\",\"https:\/\/www.youtube.com\/channel\/UC0xGnHDrjUM1pDEK2Ka5imA\"]},{\"@type\":\"Person\",\"@id\":\"http:\/\/43.205.93.38\/#\/schema\/person\/39fcf072e04987f16796546f2ca83c2e\",\"name\":\"PrepBytes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/43.205.93.38\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/850669d326db1e1531f04db0c63145d941c2a26792aaeee226a9e6675b0ac698?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/850669d326db1e1531f04db0c63145d941c2a26792aaeee226a9e6675b0ac698?s=96&d=mm&r=g\",\"caption\":\"PrepBytes\"},\"url\":\"https:\/\/prepbytes.com\/blog\/author\/prepbytes\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Find Identical and non Identical Linked Lists in C++ | Linked List | Prepbytes","description":"Given the root nodes of two LinkedList, you have to check whether these two linked lists have the same arrangement of data or not.","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:\/\/prepbytes.com\/blog\/identical-linked-lists\/","og_locale":"en_US","og_type":"article","og_title":"Find Identical and non Identical Linked Lists in C++ | Linked List | Prepbytes","og_description":"Given the root nodes of two LinkedList, you have to check whether these two linked lists have the same arrangement of data or not.","og_url":"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/","og_site_name":"PrepBytes Blog","article_publisher":"https:\/\/www.facebook.com\/prepbytes0211\/","article_published_time":"2021-08-10T13:59:48+00:00","article_modified_time":"2024-07-01T10:12:21+00:00","og_image":[{"url":"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1644911089428-Identical%20Linked%20List_Artboard%201.png","type":"","width":"","height":""}],"author":"PrepBytes","twitter_card":"summary_large_image","twitter_misc":{"Written by":"PrepBytes","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/#article","isPartOf":{"@id":"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/"},"author":{"name":"PrepBytes","@id":"http:\/\/43.205.93.38\/#\/schema\/person\/39fcf072e04987f16796546f2ca83c2e"},"headline":"Identical Linked Lists","datePublished":"2021-08-10T13:59:48+00:00","dateModified":"2024-07-01T10:12:21+00:00","mainEntityOfPage":{"@id":"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/"},"wordCount":960,"commentCount":0,"publisher":{"@id":"http:\/\/43.205.93.38\/#organization"},"image":{"@id":"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/#primaryimage"},"thumbnailUrl":"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1644911089428-Identical%20Linked%20List_Artboard%201.png","articleSection":["Linked list articles"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/prepbytes.com\/blog\/identical-linked-lists\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/","url":"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/","name":"Find Identical and non Identical Linked Lists in C++ | Linked List | Prepbytes","isPartOf":{"@id":"http:\/\/43.205.93.38\/#website"},"primaryImageOfPage":{"@id":"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/#primaryimage"},"image":{"@id":"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/#primaryimage"},"thumbnailUrl":"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1644911089428-Identical%20Linked%20List_Artboard%201.png","datePublished":"2021-08-10T13:59:48+00:00","dateModified":"2024-07-01T10:12:21+00:00","description":"Given the root nodes of two LinkedList, you have to check whether these two linked lists have the same arrangement of data or not.","breadcrumb":{"@id":"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/prepbytes.com\/blog\/identical-linked-lists\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/#primaryimage","url":"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1644911089428-Identical%20Linked%20List_Artboard%201.png","contentUrl":"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1644911089428-Identical%20Linked%20List_Artboard%201.png"},{"@type":"BreadcrumbList","@id":"https:\/\/prepbytes.com\/blog\/identical-linked-lists\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/43.205.93.38\/"},{"@type":"ListItem","position":2,"name":"Linked list articles","item":"https:\/\/prepbytes.com\/blog\/category\/linked-list\/"},{"@type":"ListItem","position":3,"name":"Identical Linked Lists"}]},{"@type":"WebSite","@id":"http:\/\/43.205.93.38\/#website","url":"http:\/\/43.205.93.38\/","name":"PrepBytes Blog","description":"ONE-STOP RESOURCE FOR EVERYTHING RELATED TO CODING","publisher":{"@id":"http:\/\/43.205.93.38\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/43.205.93.38\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/43.205.93.38\/#organization","name":"Prepbytes","url":"http:\/\/43.205.93.38\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/43.205.93.38\/#\/schema\/logo\/image\/","url":"https:\/\/blog.prepbytes.com\/wp-content\/uploads\/2025\/07\/uzxxllgloialmn9mhwfe.webp","contentUrl":"https:\/\/blog.prepbytes.com\/wp-content\/uploads\/2025\/07\/uzxxllgloialmn9mhwfe.webp","width":160,"height":160,"caption":"Prepbytes"},"image":{"@id":"http:\/\/43.205.93.38\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/prepbytes0211\/","https:\/\/www.instagram.com\/prepbytes\/","https:\/\/www.linkedin.com\/company\/prepbytes\/","https:\/\/www.youtube.com\/channel\/UC0xGnHDrjUM1pDEK2Ka5imA"]},{"@type":"Person","@id":"http:\/\/43.205.93.38\/#\/schema\/person\/39fcf072e04987f16796546f2ca83c2e","name":"PrepBytes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/43.205.93.38\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/850669d326db1e1531f04db0c63145d941c2a26792aaeee226a9e6675b0ac698?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/850669d326db1e1531f04db0c63145d941c2a26792aaeee226a9e6675b0ac698?s=96&d=mm&r=g","caption":"PrepBytes"},"url":"https:\/\/prepbytes.com\/blog\/author\/prepbytes\/"}]}},"_links":{"self":[{"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/posts\/3794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/comments?post=3794"}],"version-history":[{"count":7,"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/posts\/3794\/revisions"}],"predecessor-version":[{"id":19193,"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/posts\/3794\/revisions\/19193"}],"wp:attachment":[{"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/media?parent=3794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/categories?post=3794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/tags?post=3794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}