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

Publicado el: 16 agosto 2020
en el 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


En esta página del sitio puede ver el video en línea Delete Node In A Linked List Without Head Pointer | Interview Preparation | Programming Playground de Duración hora minuto segunda en buena calidad , que subió el usuario Programming Playground 16 agosto 2020, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 61 veces y le gustó 3 a los espectadores. Disfruta viendo!