{"id":3922,"date":"2021-11-19T14:51:34","date_gmt":"2021-11-19T09:21:34","guid":{"rendered":"https:\/\/www.interviewbit.com\/blog\/?p=3922"},"modified":"2022-06-08T17:13:27","modified_gmt":"2022-06-08T11:43:27","slug":"intersection-of-two-linked-lists","status":"publish","type":"post","link":"https:\/\/www.interviewbit.com\/blog\/intersection-of-two-linked-lists\/","title":{"rendered":"Intersection of Two Linked Lists"},"content":{"rendered":"\n<div class=\"gutentoc tocactive ullist\"><div class=\"gutentoc-toc-wrap\"><div class=\"gutentoc-toc-title-wrap\"><div class=\"gutentoc-toc-title\">Table Of Contents<\/div><div id=\"open\" class=\"toggletwo\">show<\/div><\/div><div id=\"toclist\"><div class=\"gutentoc-toc__list-wrap\"><ul class=\"gutentoc-toc__list\"><li><a href=\"#problem-statement\">Problem Statement<\/a><\/li><li><a href=\"#approach-1-brute-force\">Approach 1: Brute Force<\/a><\/li><ul class=\"gutentoc-toc__list\"><li><a href=\"#c-code\">C++ Code<\/a><\/li><li><a href=\"#java-code\">Java Code<\/a><\/li><li><a href=\"#python-code\">Python Code<\/a><\/li><\/ul><li><a href=\"#approach-2-hashing\">Approach 2: Hashing<\/a><\/li><ul class=\"gutentoc-toc__list\"><li><a href=\"#c-implementation\">C++ Implementation<\/a><\/li><li><a href=\"#java-implementation-\">Java Implementation <\/a><\/li><li><a href=\"#python-implementation-\">Python Implementation <\/a><\/li><\/ul><li><a href=\"#approach-3-two-pointers\">Approach 3: Two Pointers<\/a><\/li><ul class=\"gutentoc-toc__list\"><li><a href=\"#c-code-for-two-pointers-approach\">C++ Code For Two Pointers Approach<\/a><\/li><li><a href=\"#java-code-for-two-pointers-approach-\">Java Code For Two Pointers Approach <\/a><\/li><li><a href=\"#python-code-for-two-pointers-approach-\">Python Code For Two Pointers Approach <\/a><\/li><\/ul><li><a href=\"#practice-question\">Practice Question<\/a><\/li><li><a href=\"#additional-resources\">Additional Resources<\/a><\/li><\/ul><\/div><\/div><\/div><\/div>\n\n\n\n<h2 id=\"problem-statement\">Problem Statement<\/h2>\n\n\n\n<p>Given the heads of two linked lists <strong>A<\/strong> and <strong>B<\/strong>. The task is to return the node where both the linked lists intersect. If there is no point of intersection, return <strong>NULL.<\/strong><\/p>\n\n\n\n<p><strong>Examples:<\/strong><br><strong>Input:&nbsp;<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"438\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-4058 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image2-2-1024x438.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image2-2-1024x438.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image2-2-300x128.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image2-2-768x329.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image2-2-380x163.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image2-2-550x235.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image2-2-800x342.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image2-2.png 1124w\" ><\/figure>\n\n\n\n<p><strong>Output:<\/strong> Node 8<br><strong>Explanation: <\/strong>Shown in image<\/p>\n\n\n\n<h2 id=\"approach-1-brute-force\">Approach 1: Brute Force<\/h2>\n\n\n\n<p id=\"a-simple-approach-is-to-traverse-every-node-of-the-linked-list--b--for-each-node-of--a--and-simply-check-if-any-of-the-node-is-present-in-the-list--b-\">A simple approach is to, traverse every node of the linked list B, for each node of A and simply check if any of the nodes is present in the list <strong>B<\/strong>.<\/p>\n\n\n\n<h3 id=\"c-code\">C++ Code<\/h3>\n\n\n\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=\"\">ListNode * getIntersectionNode(ListNode * headA, ListNode * headB) {\n  while (headA != nullptr) {\n    ListNode * pB = headB;\n    while (pB != nullptr) {\n      if (headA == pB) return headA;\n      pB = pB -&amp;gt; next;\n    }\n    headA = headA -&amp;gt; next;\n  }\n  return nullptr;\n}<\/pre>\n\n\n\n<h3 id=\"java-code\">Java Code<\/h3>\n\n\n\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=\"\"> public ListNode getIntersectionNode(ListNode headA, ListNode headB) {\n  while (headA != null) {\n    ListNode pB = headB;\n    while (pB != null) {\n      if (headA == pB) return headA;\n      pB = pB.next;\n    }\n    headA = headA.next;\n  }\n  return null;\n}<\/pre>\n\n\n\n<h3 id=\"python-code\">Python Code<\/h3>\n\n\n\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=\"\">def getIntersectionNode(self, headA: ListNode, headB: ListNode) -&amp;gt; ListNode:\n    while headA is not None:\n        pB = headB\n        while pB is not None:\n            if headA == pB:\n                return headA\n            pB = pB.next\n        headA = headA.next\n \n    return None<\/pre>\n\n\n\n<p><strong>Time Complexity:<\/strong>O(N * M), where N and M is the size of the linked lists<br><strong>Space Complexity:<\/strong>O(1), as no extra space is used.<\/p>\n\n\n\n<h2 id=\"approach-2-hashing\">Approach 2: Hashing<\/h2>\n\n\n\n<p><br>In the previous approach, instead of traversing through all the nodes of B, we can simply keep track of a hashmap that stores each node of B. Now simply traverse list A, and check if any of the nodes is already present in the hashmap. If true, then it is the intersection point.<\/p>\n\n\n\n<p><strong>Algorithm<\/strong><\/p>\n\n\n\n<ul><li>Initialise a hashmap of nodes.<\/li><li>Traverse the list <strong>B<\/strong> and store each node address into the hashmap.<\/li><li>Traverse the array <strong>A<\/strong> and if the current node is already present in the hashmap, then it is the intersection point, else continue traversing.<\/li><li>If list <strong>A<\/strong> is exhausted, there is no intersection point. Hence, return <strong>NULL<\/strong>.<\/li><\/ul>\n\n\n\n<h3 id=\"c-implementation\">C++ Implementation<\/h3>\n\n\n\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=\"\">ListNode * getIntersectionNode(ListNode * headA, ListNode * headB) {\n  set &amp;lt; ListNode * &amp;gt; nodes_in_B;\n \n  while (headB != nullptr) {\n    nodes_in_B.insert(headB);\n    headB = headB -&amp;gt; next;\n  }\n \n  while (headA != nullptr) {\n    if (nodes_in_B.find(headA) != nodes_in_B.end()) {\n      return headA;\n    }\n    headA = headA -&amp;gt; next;\n  }\n \n  return nullptr;\n}<\/pre>\n\n\n\n<h3 id=\"java-implementation-\"><span id=\"java-implementation\">Java Implementation <\/span><\/h3>\n\n\n\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=\"\">public ListNode getIntersectionNode(ListNode headA, ListNode headB) {\n   Set &amp;lt; ListNode > nodesInB = new HashSet &amp;lt; ListNode > ();\n \n   while (headB != null) {\n     nodesInB.add(headB);\n     headB = headB.next;\n   }\n \n   while (headA != null) {\n     if (nodesInB.contains(headA)) {\n       return headA;\n     }\n     headA = headA.next;\n   }\n \n   return null;\n }<\/pre>\n\n\n\n<h3 id=\"python-implementation-\"><span id=\"python-implementation\">Python Implementation <\/span><\/h3>\n\n\n\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=\"\">def getIntersectionNode(self, headA: ListNode, headB: ListNode) -&amp;gt; ListNode:\n    nodes_in_B = set()\n \n    while headB is not None:\n        nodes_in_B.add(headB)\n        headB = headB.next\n \n    while headA is not None:\n        if headA in nodes_in_B:\n            return headA\n        headA = headA.next\n \n    return None<\/pre>\n\n\n\n<p><strong>Time Complexity:<\/strong>O(N + M), where N and M is the size of the linked list<br><strong>Space Complexity:<\/strong>O(M), since the nodes of list B are stored.<\/p>\n\n\n\n<h2 id=\"approach-3-two-pointers\">Approach 3: Two Pointers<\/h2>\n\n\n\n<p><strong><br><\/strong>While we have already achieved the best time complexity possible, but is it possible to reduce the space complexity?<\/p>\n\n\n\n<p>Well, it can be done in O(1) using a two-pointer approach. Let&#8217;s understand how.<\/p>\n\n\n\n<p>The key idea to note is that, if the two linked lists contain a common point, the length from that intersection point to the tail will be the same.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"297\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-4062 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image3-2-1024x297.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image3-2-1024x297.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image3-2-300x87.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image3-2-768x223.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image3-2-380x110.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image3-2-550x159.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image3-2-800x232.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image3-2-1160x336.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image3-2.png 1376w\" ><\/figure>\n\n\n\n<p>Since the tail length must be the same, the intersection node should be any of the first five nodes in the given image.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"297\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-4063 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image1-5-1024x297.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image1-5-1024x297.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image1-5-300x87.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image1-5-768x223.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image1-5-380x110.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image1-5-550x159.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image1-5-800x232.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image1-5-1160x336.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image1-5.png 1376w\" ><\/figure>\n\n\n\n<p>Therefore, place two-pointers and keep checking if the nodes are equal.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"297\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-4064 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image4-1024x297.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image4-1024x297.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image4-300x87.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image4-768x223.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image4-380x110.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image4-550x159.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image4-800x232.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image4-1160x336.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2021\/11\/Image4.png 1376w\" ><\/figure>\n\n\n\n<p><strong>Algorithm<\/strong><\/p>\n\n\n\n<ul><li>Set a pointer p1 to list A.<\/li><li>Set a pointer p2 to list B.<\/li><li>Run a while loop and while the nodes pointed by p1 and p2 are not same:<ul><li>If p1 is pointing to <strong>NULL<\/strong>, set p1 to head of B.<\/li><li>Else, move to the next node of <strong>A<\/strong>.<\/li><li>If p2 is pointing to <strong>NULL<\/strong>, set p2 to head of A.<\/li><li>Else, move to the next node of <strong>B<\/strong>.<\/li><\/ul><\/li><li>Return the node pointed by p1.<\/li><\/ul>\n\n\n\n<h3 id=\"c-code-for-two-pointers-approach\">C++ Code For Two Pointers Approach<\/h3>\n\n\n\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=\"\">ListNode * getIntersectionNode(ListNode * headA, ListNode * headB) {\n  ListNode * pA = headA;\n  ListNode * pB = headB;\n  while (pA != pB) {\n    pA = pA == nullptr ? headB : pA -&amp;gt; next;\n    pB = pB == nullptr ? headA : pB -&amp;gt; next;\n  }\n  return pA;\n}<\/pre>\n\n\n\n<h3 id=\"java-code-for-two-pointers-approach-\"><span id=\"java-code-for-two-pointers-approach\">Java Code For Two Pointers Approach <\/span><\/h3>\n\n\n\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=\"\">public ListNode getIntersectionNode(ListNode headA, ListNode headB) {\n  ListNode pA = headA;\n  ListNode pB = headB;\n  while (pA != pB) {\n    pA = pA == null ? headB : pA.next;\n    pB = pB == null ? headA : pB.next;\n  }\n  return pA;\n}<\/pre>\n\n\n\n<h3 id=\"python-code-for-two-pointers-approach-\"><span id=\"python-code-for-two-pointers-approach\">Python Code For Two Pointers Approach <\/span><\/h3>\n\n\n\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=\"\">def getIntersectionNode(self, headA: ListNode, headB: ListNode) -&amp;gt; ListNode:\n    pA = headA\n    pB = headB\n \n    while pA != pB:\n        pA = headB if pA is None else pA.next\n        pB = headA if pB is None else pB.next\n \n    return pA<\/pre>\n\n\n\n<p><strong>Time Complexity:<\/strong>O(N + M), where N and M is the size of the linked list<br><strong>Space Complexity:<\/strong>O(1), since no extra space is used.<\/p>\n\n\n\n<h2 id=\"practice-question\">Practice Question<\/h2>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/www.interviewbit.com\/problems\/intersection-of-linked-lists\/\" target=\"_blank\">Intersection Of Linked Lists<\/a><\/p>\n\n\n\n<h2 id=\"additional-resources\">Additional Resources<\/h2>\n\n\n\n<ul><li><a rel=\"noreferrer noopener\" href=\"https:\/\/www.interviewbit.com\/blog\/detect-loop-in-linked-list\/\" target=\"_blank\">Detect Loop in Linked List<\/a><\/li><li><a rel=\"noreferrer noopener\" href=\"https:\/\/www.interviewbit.com\/blog\/reverse-a-linked-list\/\" target=\"_blank\">Reverse a Linked List<\/a><\/li><li><a rel=\"noreferrer noopener\" href=\"https:\/\/www.interviewbit.com\/blog\/delete-node-in-a-linked-list\/\" target=\"_blank\">Delete Node in a Linked List<\/a><\/li><li><a rel=\"noreferrer noopener\" href=\"https:\/\/www.interviewbit.com\/blog\/add-two-numbers-represented-by-linked-lists\/\" target=\"_blank\">Add Two Numbers Represented by Linked Lists<\/a><\/li><li><a rel=\"noreferrer noopener\" href=\"https:\/\/www.interviewbit.com\/linked-list-interview-questions\/\" target=\"_blank\">Linked List Interview Questions<\/a><\/li><li><a rel=\"noreferrer noopener\" href=\"https:\/\/www.interviewbit.com\/linked-list-mcq\/\" target=\"_blank\">Linked List MCQ<\/a><\/li><li><a rel=\"noreferrer noopener\" href=\"https:\/\/www.interviewbit.com\/blog\/application-of-linked-list\/\" target=\"_blank\">Application of Linked List<\/a><\/li><li><a rel=\"noreferrer noopener\" href=\"https:\/\/www.interviewbit.com\/blog\/types-of-linked-list\/\" target=\"_blank\">Types of Linked List<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"Problem Statement Given the heads of two linked lists A and B. The task is to return the&hellip;\n","protected":false},"author":5,"featured_media":4066,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_daextam_enable_autolinks":"1","csco_singular_sidebar":"","csco_page_header_type":"","csco_appearance_grid":"","csco_page_load_nextpost":"","csco_post_video_location":[],"csco_post_video_location_hash":"","csco_post_video_url":"","csco_post_video_bg_start_time":0,"csco_post_video_bg_end_time":0},"categories":[145],"tags":[457,464,589,418],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts\/3922"}],"collection":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/comments?post=3922"}],"version-history":[{"count":7,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts\/3922\/revisions"}],"predecessor-version":[{"id":9713,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts\/3922\/revisions\/9713"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/media\/4066"}],"wp:attachment":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/media?parent=3922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/categories?post=3922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/tags?post=3922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}