Skip to content

Commit

Permalink
Update Intersection_Linked_list_python.md
Browse files Browse the repository at this point in the history
I have made three changes as per review.
  • Loading branch information
SKG24 committed Nov 4, 2024
1 parent b72e1b7 commit 2a0dd06
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/linked-list/Intersection_Linked_list_python.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
id: Intersection_Linked_lists_python
id: intersection-linked-lists-python
sidebar_position: 1
title: "Find the Intersection Point of Two Linked Lists in Python using hash set"
description: "This tutorial explains how to find the intersection point of two singly linked lists using Python."
Expand All @@ -17,8 +17,8 @@ In a linked list, the intersection of two lists occurs when two linked lists sha

Consider the following two linked lists:

- **List A**: 1 -> 2 -> 3
- **List B**: 4 -> 5
- **List A**: `1 -> 2 -> 3`
- **List B**: `4 -> 5`
- Both lists intersect at the node with value `3`.

The expected output in this case is:
Expand Down Expand Up @@ -93,4 +93,5 @@ if __name__ == "__main__":
if intersection:
print(f"Intersection at node with value: {intersection.val}")
else:
print("No intersection")
print("No intersection")
```

0 comments on commit 2a0dd06

Please sign in to comment.