{"id":501,"date":"2021-07-13T17:04:15","date_gmt":"2021-07-13T17:04:15","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=501"},"modified":"2021-09-13T06:45:11","modified_gmt":"2021-09-13T06:45:11","slug":"write-a-function-to-get-the-intersection-point-of-two-linked-lists","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\/","title":{"rendered":"Write a function to get the intersection point of two Linked Lists"},"content":{"rendered":"<div class=\"TextHeading\">\n<div class=\"hddn\">\n<h2 id=\"write-a-function-to-get-the-intersection-point-of-two-linked-lists\" class=\"color-pink\" style=\"text-align: justify;\">Write a function to get the intersection point of two Linked Lists<\/h2>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>Intersection point means end of one\u00a0<a href=\"https:\/\/www.wikitechy.com\/tutorials\/csharp\/csharp-linked-list\" target=\"_blank\" rel=\"noopener\">linked list<\/a>\u00a0is linked with some node in another linked list.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"ImageContent\" style=\"text-align: justify;\">\n<div class=\"hddn\"><img decoding=\"async\" class=\"img-responsive center-block aligncenter\" src=\"https:\/\/cdn.wikitechy.com\/interview-questions\/data-structure\/intersection-linked-list.png\" alt=\" data- linked-list\" \/><\/div>\n<\/div>\n<p style=\"text-align: justify;\">Given two Linked Lists, create intersection lists that contain intersection of the elements present in the given lists.<\/p>\n<div class=\"TextHeading\">\n<div class=\"hddn\">\n<h2 id=\"example\" class=\"color-pink\" style=\"text-align: justify;\">Example<\/h2>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-markdown code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-markdown code-embed-code\">Input:<br\/>   List1: 20->25->4->30<br\/>   lsit2:  8->4->2->20<br\/>Output:<br\/>   Intersection List: 4->20<\/code><\/pre> <\/div>\n<h2 id=\"sample-code-in-c\" class=\"color-purple\" style=\"text-align: justify;\">Sample Code in C:<\/h2>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-c code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-c code-embed-code\">\/ C program to get intersection point of two linked list  <br\/>#include<stdio.h> <br\/>#include<stdlib.h> <br\/>  <br\/>\/* Link list node *\/<br\/>struct Node <br\/>{ <br\/>  int data; <br\/>  struct Node* next; <br\/>}; <br\/>  <br\/>\/* Function to get the counts of node in a linked list *\/<br\/>int getCount(struct Node* head); <br\/>  <br\/>\/* function to get the intersection point of two linked <br\/>   lists head1 and head2 where head1 has d more nodes than <br\/>   head2 *\/<br\/>int _getIntesectionNode(int d, struct Node* head1, struct Node* head2); <br\/>  <br\/>\/* function to get the intersection point of two linked <br\/>   lists head1 and head2 *\/<br\/>int getIntesectionNode(struct Node* head1, struct Node* head2) <br\/>{ <br\/>  int c1 = getCount(head1); <br\/>  int c2 = getCount(head2); <br\/>  int d; <br\/>  <br\/>  if(c1 > c2) <br\/>  { <br\/>    d = c1 - c2; <br\/>    return _getIntesectionNode(d, head1, head2); <br\/>  } <br\/>  else<br\/>  { <br\/>    d = c2 - c1; <br\/>    return _getIntesectionNode(d, head2, head1); <br\/>  } <br\/>} <br\/>  <br\/>\/* function to get the intersection point of two linked <br\/>   lists head1 and head2 where head1 has d more nodes than <br\/>   head2 *\/<br\/>int _getIntesectionNode(int d, struct Node* head1, struct Node* head2) <br\/>{ <br\/>  int i; <br\/>  struct Node* current1 = head1; <br\/>  struct Node* current2 = head2; <br\/>  <br\/>  for(i = 0; i < d; i++) <br\/>  { <br\/>    if(current1 == NULL) <br\/>    {  return -1; } <br\/>    current1 = current1->next; <br\/>  } <br\/>  <br\/>  while(current1 !=  NULL && current2 != NULL) <br\/>  { <br\/>    if(current1 == current2) <br\/>      return current1->data; <br\/>    current1= current1->next; <br\/>    current2= current2->next; <br\/>  } <br\/>  <br\/>  return -1; <br\/>} <br\/>  <br\/>\/* Takes head pointer of the linked list and <br\/>   returns the count of nodes in the list *\/<br\/>int getCount(struct Node* head) <br\/>{ <br\/>  struct Node* current = head; <br\/>  int count = 0; <br\/>  <br\/>  while (current != NULL) <br\/>  { <br\/>    count++; <br\/>    current = current->next; <br\/>  } <br\/>  <br\/>  return count; <br\/>} <br\/>  <br\/>\/* IGNORE THE BELOW LINES OF CODE. THESE LINES <br\/>   ARE JUST TO QUICKLY TEST THE ABOVE FUNCTION *\/<br\/>int main() <br\/>{ <br\/>  \/* <br\/>    Create two linked lists <br\/>  <br\/>    1st 3->6->9->15->30 <br\/>    2nd 10->15->30 <br\/>  <br\/>    15 is the intersection point <br\/>  *\/<br\/>  <br\/>  struct Node* newNode; <br\/>  struct Node* head1 = <br\/>            (struct Node*) malloc(sizeof(struct Node)); <br\/>  head1->data  = 10; <br\/>  <br\/>  struct Node* head2 = <br\/>            (struct Node*) malloc(sizeof(struct Node)); <br\/>  head2->data  = 3; <br\/>  <br\/>  newNode = (struct Node*) malloc (sizeof(struct Node)); <br\/>  newNode->data = 6; <br\/>  head2->next = newNode; <br\/>  <br\/>  newNode = (struct Node*) malloc (sizeof(struct Node)); <br\/>  newNode->data = 9; <br\/>  head2->next->next = newNode; <br\/>  <br\/>  newNode = (struct Node*) malloc (sizeof(struct Node)); <br\/>  newNode->data = 15; <br\/>  head1->next = newNode; <br\/>  head2->next->next->next  = newNode; <br\/>  <br\/>  newNode = (struct Node*) malloc (sizeof(struct Node)); <br\/>  newNode->data = 30; <br\/>  head1->next->next= newNode; <br\/>  <br\/>  head1->next->next->next = NULL; <br\/>  <br\/>  printf(&quot;\\n The node of intersection is %d \\n&quot;, <br\/>          getIntesectionNode(head1, head2)); <br\/>  <br\/>  getchar(); <br\/>} <\/code><\/pre> <\/div>\n<div class=\"TextHeading\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"code-explanation\" class=\"color-purple\">Code Explanation :<\/h2>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>Get count of the nodes in the first list, let count be c1.<\/li>\n<li>Get count of the nodes in the second list, let count be c2.<\/li>\n<li>Get the difference of counts d = abs (c1 \u2013 c2)<\/li>\n<li>Now traverse the bigger list from the first node till d nodes so that from here onwards both the lists have equal no of nodes.<\/li>\n<li>Then we can traverse both the lists in parallel till we come across a common node. (Note that getting a common node is done by comparing the address of the nodes)<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<p align=\"justify\">Time Complexity: O(m+n)<br \/>\nAuxiliary Space: O(1)<\/p>\n<\/div>\n<\/div>\n<div class=\"TextHeading\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<h2 id=\"output\" class=\"color-blue\">Output :<\/h2>\n<\/div>\n<\/div>\n<div class=\"Output\">\n<div class=\"hddn\">\n<figure class=\"highlight\" style=\"text-align: justify;\">\n<pre><code class=\"hljs javascript\" data-lang=\"\"><span class=\"nt\">The node <span class=\"hljs-keyword\">of<\/span> intersection is <span class=\"hljs-number\">15<\/span><\/span><\/code><\/pre>\n<\/figure>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Answer : Intersection point means end of one linked list is linked..<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3028],"tags":[195,3510,971,491,221,368,203,199,214,198,363,3057,15938,205,3509,3506,3508,222,484,3054,3522,196,212,3504,3512,3511,3517,3513,3520,3518,207,366,204,3507,206,972,3521,200,3055,3514,3516,3505,3519,3515,197,968,3056,285,969],"class_list":["post-501","post","type-post","status-publish","format-standard","hentry","category-data-structure","tag-accenture-interview-questions-and-answers","tag-add-two-numbers-represented-by-linked-lists","tag-altimetrik-india-pvt-ltd-interview-questions-and-answers","tag-applied-materials-interview-questions-and-answers","tag-bharti-airtel-interview-questions-and-answers","tag-bmc-software-interview-questions-and-answers","tag-capgemini-interview-questions-and-answers","tag-casting-networks-india-pvt-limited-interview-questions-and-answers","tag-cgi-group-inc-interview-questions-and-answers","tag-chetu-interview-questions-and-answers","tag-ciena-corporation-interview-questions-and-answers","tag-collabera-te-interview-questions-and-answers","tag-compro-technologies-interview-questions-and-answers","tag-dell-international-services-india-pvt-ltd-interview-questions-and-answers","tag-detect-loop-in-linked-list","tag-find-the-merge-point-of-two-linked-lists-in-c","tag-find-the-merge-point-of-two-linked-lists-in-data-structure","tag-flipkart-interview-questions-and-answers","tag-genpact-interview-questions-and-answers","tag-globallogic-india-pvt-ltd-interview-questions-and-answers","tag-how-to-move-a-node-in-a-linked-list-java","tag-ibm-interview-questions-and-answers","tag-indecomm-global-services-interview-questions-and-answers","tag-intersection-of-two-linked-lists","tag-intersection-of-two-linked-lists-c","tag-intersection-of-two-linked-lists-in-c","tag-intersection-of-two-lists-java","tag-intersection-point-in-y-shapped-linked-lists","tag-list-intersection-c","tag-merge-sort-for-linked-list","tag-mphasis-interview-questions-and-answers","tag-netapp-interview-questions-and-answers","tag-oracle-corporation-interview-questions-and-answers","tag-pairwise-swap-of-a-linked-list","tag-sap-labs-india-pvt-ltd-interview-questions-and-answers","tag-sapient-consulting-pvt-ltd-interview-questions-and-answers","tag-swap-nodes-doubly-linked-list-c","tag-tech-mahindra-interview-questions-and-answers","tag-tracxn-technologies-pvt-ltd-interview-questions-and-answers","tag-union-and-intersection-of-two-linked-lists-in-c","tag-union-and-intersection-of-two-linked-lists-in-python","tag-union-and-intersection-of-two-linked-lists-using-c","tag-union-find-linked-list-java","tag-union-of-two-linked-lists-c","tag-unitedhealth-group-interview-questions-and-answers","tag-wipro-infotech-interview-questions-and-answers","tag-wm-global-technology-services-india-pvt-ltd-limited-wmgts-interview-questions-and-answers","tag-xoriant-solutions-pvt-ltd-interview-questions-and-answers","tag-yodlee-infotech-pvt-ltd-interview-questions-and-answers"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Write a function to get the intersection point of two Linked Lists<\/title>\n<meta name=\"description\" content=\"Write a function to get the intersection point of two Linked Lists - Intersection point means end of one linked list is linked with some node\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Write a function to get the intersection point of two Linked Lists\" \/>\n<meta property=\"og:description\" content=\"Write a function to get the intersection point of two Linked Lists - Intersection point means end of one linked list is linked with some node\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-13T17:04:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-13T06:45:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.wikitechy.com\/interview-questions\/data-structure\/intersection-linked-list.png\" \/>\n<meta name=\"author\" content=\"Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Editor\" \/>\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:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/data-structure\\\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/data-structure\\\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\\\/\"},\"author\":{\"name\":\"Editor\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\"},\"headline\":\"Write a function to get the intersection point of two Linked Lists\",\"datePublished\":\"2021-07-13T17:04:15+00:00\",\"dateModified\":\"2021-09-13T06:45:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/data-structure\\\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\\\/\"},\"wordCount\":861,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/data-structure\\\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.wikitechy.com\\\/interview-questions\\\/data-structure\\\/intersection-linked-list.png\",\"keywords\":[\"Accenture interview questions and answers\",\"add two numbers represented by linked lists\",\"Altimetrik India Pvt Ltd interview questions and answers\",\"Applied Materials interview questions and answers\",\"Bharti Airtel interview questions and answers\",\"BMC Software interview questions and answers\",\"Capgemini interview questions and answers\",\"CASTING NETWORKS INDIA PVT LIMITED interview questions and answers\",\"CGI Group Inc interview questions and answers\",\"Chetu interview questions and answers\",\"Ciena Corporation interview questions and answers\",\"Collabera Te interview questions and answers\",\"compro technologies interview questions and answers\",\"Dell International Services India Pvt Ltd interview questions and answers\",\"detect loop in linked list\",\"find the merge point of two linked lists in c++\",\"find the merge point of two linked lists in data structure\",\"Flipkart interview questions and answers\",\"Genpact interview questions and answers\",\"Globallogic India Pvt Ltd interview questions and answers\",\"how to move a node in a linked list java\",\"IBM interview questions and answers\",\"Indecomm Global Services interview questions and answers\",\"intersection of two linked lists\",\"intersection of two linked lists c++\",\"intersection of two linked lists in c\",\"intersection of two lists java\",\"intersection point in y shapped linked lists\",\"list intersection c++\",\"merge sort for linked list\",\"Mphasis interview questions and answers\",\"NetApp interview questions and answers\",\"Oracle Corporation interview questions and answers\",\"pairwise swap of a linked list\",\"SAP Labs India Pvt Ltd interview questions and answers\",\"Sapient Consulting Pvt Ltd interview questions and answers\",\"swap nodes doubly linked list c++\",\"Tech Mahindra interview questions and answers\",\"Tracxn Technologies Pvt Ltd interview questions and answers\",\"union and intersection of two linked lists in c++\",\"union and intersection of two linked lists in python\",\"union and intersection of two linked lists using c++\",\"union find linked list java\",\"union of two linked lists c++\",\"UnitedHealth Group interview questions and answers\",\"Wipro Infotech interview questions and answers\",\"WM Global Technology Services India Pvt.Ltd Limited (WMGTS) interview questions and answers\",\"Xoriant Solutions Pvt Ltd interview questions and answers\",\"Yodlee Infotech Pvt Ltd interview questions and answers\"],\"articleSection\":[\"Data Structure\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/data-structure\\\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/data-structure\\\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\\\/\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/data-structure\\\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\\\/\",\"name\":\"Write a function to get the intersection point of two Linked Lists\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/data-structure\\\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/data-structure\\\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.wikitechy.com\\\/interview-questions\\\/data-structure\\\/intersection-linked-list.png\",\"datePublished\":\"2021-07-13T17:04:15+00:00\",\"dateModified\":\"2021-09-13T06:45:11+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\"},\"description\":\"Write a function to get the intersection point of two Linked Lists - Intersection point means end of one linked list is linked with some node\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/data-structure\\\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/data-structure\\\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\\\/#primaryimage\",\"url\":\"https:\\\/\\\/cdn.wikitechy.com\\\/interview-questions\\\/data-structure\\\/intersection-linked-list.png\",\"contentUrl\":\"https:\\\/\\\/cdn.wikitechy.com\\\/interview-questions\\\/data-structure\\\/intersection-linked-list.png\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#website\",\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/\",\"name\":\"Wikitechy\",\"description\":\"Interview Questions\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/#\\\/schema\\\/person\\\/4d5a581fb5470d1560324bddc5e8b757\",\"name\":\"Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"caption\":\"Editor\"},\"url\":\"https:\\\/\\\/www.wikitechy.com\\\/interview-questions\\\/author\\\/editor\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Write a function to get the intersection point of two Linked Lists","description":"Write a function to get the intersection point of two Linked Lists - Intersection point means end of one linked list is linked with some node","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:\/\/www.wikitechy.com\/interview-questions\/data-structure\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\/","og_locale":"en_US","og_type":"article","og_title":"Write a function to get the intersection point of two Linked Lists","og_description":"Write a function to get the intersection point of two Linked Lists - Intersection point means end of one linked list is linked with some node","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\/","og_site_name":"Wikitechy","article_published_time":"2021-07-13T17:04:15+00:00","article_modified_time":"2021-09-13T06:45:11+00:00","og_image":[{"url":"https:\/\/cdn.wikitechy.com\/interview-questions\/data-structure\/intersection-linked-list.png","type":"","width":"","height":""}],"author":"Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Editor","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\/#article","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\/"},"author":{"name":"Editor","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757"},"headline":"Write a function to get the intersection point of two Linked Lists","datePublished":"2021-07-13T17:04:15+00:00","dateModified":"2021-09-13T06:45:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\/"},"wordCount":861,"commentCount":0,"image":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.wikitechy.com\/interview-questions\/data-structure\/intersection-linked-list.png","keywords":["Accenture interview questions and answers","add two numbers represented by linked lists","Altimetrik India Pvt Ltd interview questions and answers","Applied Materials interview questions and answers","Bharti Airtel interview questions and answers","BMC Software interview questions and answers","Capgemini interview questions and answers","CASTING NETWORKS INDIA PVT LIMITED interview questions and answers","CGI Group Inc interview questions and answers","Chetu interview questions and answers","Ciena Corporation interview questions and answers","Collabera Te interview questions and answers","compro technologies interview questions and answers","Dell International Services India Pvt Ltd interview questions and answers","detect loop in linked list","find the merge point of two linked lists in c++","find the merge point of two linked lists in data structure","Flipkart interview questions and answers","Genpact interview questions and answers","Globallogic India Pvt Ltd interview questions and answers","how to move a node in a linked list java","IBM interview questions and answers","Indecomm Global Services interview questions and answers","intersection of two linked lists","intersection of two linked lists c++","intersection of two linked lists in c","intersection of two lists java","intersection point in y shapped linked lists","list intersection c++","merge sort for linked list","Mphasis interview questions and answers","NetApp interview questions and answers","Oracle Corporation interview questions and answers","pairwise swap of a linked list","SAP Labs India Pvt Ltd interview questions and answers","Sapient Consulting Pvt Ltd interview questions and answers","swap nodes doubly linked list c++","Tech Mahindra interview questions and answers","Tracxn Technologies Pvt Ltd interview questions and answers","union and intersection of two linked lists in c++","union and intersection of two linked lists in python","union and intersection of two linked lists using c++","union find linked list java","union of two linked lists c++","UnitedHealth Group interview questions and answers","Wipro Infotech interview questions and answers","WM Global Technology Services India Pvt.Ltd Limited (WMGTS) interview questions and answers","Xoriant Solutions Pvt Ltd interview questions and answers","Yodlee Infotech Pvt Ltd interview questions and answers"],"articleSection":["Data Structure"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\/","name":"Write a function to get the intersection point of two Linked Lists","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\/#primaryimage"},"image":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.wikitechy.com\/interview-questions\/data-structure\/intersection-linked-list.png","datePublished":"2021-07-13T17:04:15+00:00","dateModified":"2021-09-13T06:45:11+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757"},"description":"Write a function to get the intersection point of two Linked Lists - Intersection point means end of one linked list is linked with some node","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/data-structure\/write-a-function-to-get-the-intersection-point-of-two-linked-lists\/#primaryimage","url":"https:\/\/cdn.wikitechy.com\/interview-questions\/data-structure\/intersection-linked-list.png","contentUrl":"https:\/\/cdn.wikitechy.com\/interview-questions\/data-structure\/intersection-linked-list.png"},{"@type":"WebSite","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website","url":"https:\/\/www.wikitechy.com\/interview-questions\/","name":"Wikitechy","description":"Interview Questions","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757","name":"Editor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","caption":"Editor"},"url":"https:\/\/www.wikitechy.com\/interview-questions\/author\/editor\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/501","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/comments?post=501"}],"version-history":[{"count":3,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/501\/revisions"}],"predecessor-version":[{"id":3501,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/501\/revisions\/3501"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}