panditakshay402 / Hacktoberfest

Join the Hacktoberfest fun! Contribute to this repo and earn cool swag while improving open-source projects.
115 stars 413 forks source link

Your linked list folder contains few codes , want to add "detect and remove loop in the linked list" problem ? #348

Open Amit-yadav099 opened 1 month ago

Amit-yadav099 commented 1 month ago

//this problem mainly improve the understanding of slow and pointers in the linked list which mainly used to detect loop in the linked list

Given the head of a linked list that may contain a loop. A loop means that the last node of the linked list is connected back to a node in the same list. The task is to Remove the loop from the linked list (if it exists). eaxmple test case:- input:1->2->3->4, pos = 1 this 'pos' tells to which position the end node is connceted in the given linked list, here 4 is connceted to 1 , which is at position 1.

output : 1->2->3->4 now there is no loops present in the linked list

karanghuge01 commented 1 month ago

I want to add detect and remove loop in the linked list" problem. kindly assign this issue to me.

panditakshay402 commented 1 month ago

@Amit-yadav099 Kindly follow all the rules from Readme.md to get PR accepted