Closed Rohanfizz closed 4 years ago
Congrats for creating your first issue here! Wait till our mentors assign this issue to you. In the meantime have a look at contribution guidlines to avoid any PR rejection! (Rules are strict here)
Please accept #272 . Thanks :) Happy Hacktober 2020!
An important LinkedList dsa question
This question has destroyed my seniors and i want to make it available everywhere possible so that it cant haunt anyone else!
The question is to create a clone of a linkedlist with a random pointer. More information regarding this can be found in this article - https://www.geeksforgeeks.org/a-linked-list-with-next-and-arbit-pointer/
To solve this question we do 3 parses on the linkedlist Parse 1- make clone nodes Parse 2- set the next of original node pointers to their copies Parse 3- not adjust the random pointers
And in the end we disconnect the 2 linkedlists
Language - CPP Please approve the below pull request so that everyone can look at the code. Peace :)