Copy/Clone Linked List with Random Pointer | 2 Methods

Publicado el: 09 enero 2022
en el canal de: Fit Coder
1,377
15

In this video, I have explained how to copy/clone a linked list with next and random pointers.
Given a doubly linked list with one pointer of each node pointing to the next node just like in a single link list. The second pointer however can point to any node in the list and not just the previous node.
Construct a copy of the list and return the head of the copied linked list.

Source code: https://github.com/fit-coder/fitcoder...

00:00 Introduction
00:22 Problem explanation
02:30 Method 1 (Using extra space)
13:36 Method 2 (Without extra space)
24:46 Implementation

-------------------------------------------------------------
I live in New Delhi and love explaining programming concepts. I have done M.Tech(BITS Pilani) + B.Tech(PEC, Chandigarh) in Computer Science and am currently working as a software engineer in a MNC.
If you like my content, please like, share my videos and subscribe to the channel.
-------------------------------------------------------------

For Linked List tutorials, please refer to the below playlist:
   • Linked List  

For Binary tree tutorials, please refer to the below playlist:
   • Tree Data Structures  

For Binary search tree tutorials, please refer to the below playlist:
   • Binary Search Tree  

For in-depth Graph theory and implementation details, please refer to the below playlist:
   • Graph Algorithms  

#DataStructure,#LinkedList,#FitCoder,#Algorithm,#competitiveprogramming,#faang,#codinginterview


En esta página del sitio puede ver el video en línea Copy/Clone Linked List with Random Pointer | 2 Methods de Duración hora minuto segunda en buena calidad , que subió el usuario Fit Coder 09 enero 2022, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 1,377 veces y le gustó 15 a los espectadores. Disfruta viendo!