Delete Node In A Linked List Without Head Pointer | Interview Preparation | Programming Playground

Publié le: 16 août 2020
sur la chaîne: Programming Playground
61
3

This question has been asked multiple times in interviews of companies like Amazon and Goldman Sachs.

Problem Statement:
Delete a node from a linked list but you are given only the pointer to the node which is to be deleted.

Link to problem: https://leetcode.com/problems/delete-...

Approach:
Recursively copy the data from the next node to the current node while traversing the complete linked list.

PS: The code does not work when node to be deleted is the last node(tail). Comment the modification in the code such that it works for the case when the node to be deleted is the last node.

About:
Best YouTube Channel For Interview Preparation.
Subscribe Now.


Problem Link: https://leetcode.com/problems/delete-...
Music: https://www.bensound.com


Sur cette page du site, vous pouvez voir la vidéo en ligne Delete Node In A Linked List Without Head Pointer | Interview Preparation | Programming Playground durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Programming Playground 16 août 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 61 fois et il a aimé 3 téléspectateurs. Bon visionnage!