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

Pubblicato il: 16 agosto 2020
sul canale di: 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


In questa pagina del sito puoi guardare il video online Delete Node In A Linked List Without Head Pointer | Interview Preparation | Programming Playground della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Programming Playground 16 agosto 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 61 volte e gli è piaciuto 3 spettatori. Buona visione!