# How to Find The Merge Point of Two Linked Lists

Using Python. We are given two singly linked lists and we have to find the point at which they merge.

### Understand the Problem

We are given two singly linked lists and we have to find the point at which they merge.

``````[SLL 1] 1--->3--->5
\
9--->12--->17--->None
/
[SLL 2] 7--->8``````

The diagram above illustrates that the merge occurs at node 9.

We can rest assured that the parameters we are given, head1 and head2, which are the heads of both lists will never be equal and will never be none. The two lists are also guaranteed to also merge at some point.

We need a plan to find and return the integer data value of the node where the two lists merge.

### Plan

In order to traverse through the lists to find the point at which they merge, we need to set two different pointers. One for the first singly linked list, another for the second. Remember that we are given the heads of both as parameters, so we will set our pointers to them in order to start from the beginning of each.

``````pointer1 = head1

To begin traversing the lists, weâ€™ll need create a while loop to loop through the lists while the lists are not None.

``while not None:``

If at any point, pointer1 and pointer2 are equal, we must break out of the while loop, as we have found the node where the two lists merge.

``````if pointer1 == pointer2:
break``````

However, if it is not equal, we will move forward by utilizing .next.

## Basic Data Types in Python | Python Web Development For Beginners

In the programming world, Data types play an important role. Each Variable is stored in different data types and responsible for various functions. Python had two different objects, and They are mutable and immutable objects.

## Do you have the Software Engineer and Data Scientist skills?

Becoming a reliable software engineer or data scientist developer, and prepare for production level coding requires a few techniques.

## Data Science With Python Training | Python Data Science Course | Intellipaat

đź”µ Intellipaat Data Science with Python course: https://intellipaat.com/python-for-data-science-training/In this Data Science With Python Training video, you...

## Software Developer vs Software Engineer â€” Differences: Bogus or Real?

In this article, see if there are any differences between software developers and software engineers. What youâ€™re about to read mostly revolves around my personal thoughts, deductions, and offbeat imagination. If you have different sentiments, add them in the comment section, and letâ€™s dispute! So, todayâ€™s topicâ€¦

## Managing Data as a Data Engineer: â€ŠUnderstanding Data Changes

Understand how data changes in a fast growing company makes working with data challenging. In the last article, we looked at how users view data and the challenges they face while using data.