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

Publicado em: 16 Agosto 2020
no canal de: 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


Nesta página do site você pode assistir ao vídeo on-line Delete Node In A Linked List Without Head Pointer | Interview Preparation | Programming Playground duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Programming Playground 16 Agosto 2020, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 61 vezes e gostou 3 espectadores. Boa visualização!