Data Structures: Delete a node from N-ary tree | C++ Tutorial @VDEngineering
Data Structures: Delete a node from N-ary tree | C++ Tutorial  @VDEngineering
Uploaded August 2022 | Updated September 2026, 3 days ago
In this data structures video you will learn how to delete a node from an n-ary tree using C++. This is a tree in which each node can have more than 2 children. There are four unique cases, the node to be deleted either;
1) Is a leaf node,
2) Has one child,
3) Has many children and you want to promote all of the children.
4) Has many children and you want to promote only one of the children.
You will also learn how to use recursion to search for a node in an n-ary tree using Depth First Search (DFS).

Previous topics covered included deleting a node from a binary tree or binary search tree. This topic is slightly more advanced and is not asked on LeetCode. However, it is relevant to real world projects.

Resources:
~~MyCodeSchool: Deleting a node from a binary search tree: youtube.com/watch?v=gcULXE7ViZw
~~Creating an n-ary tree: youtube.com/watch?v=bADJ2IjFsWs
~~The code for printing a tree in 2D to the screen was taken from: geeksforgeeks.org/print-n-ary-tree-graphically

Thanks for watching!
~~My Udemy Courses on Motion Planning / Navigation / Trajectory Planning:
udemy.com/course/autonomous-robots-nonholonomic-motion-planning-algorithms
~~Website: vinayakd.com
~~Instagram: instagram.com/vinayak_desh
Data Structures: Delete a node from N-ary tree | C++ TutorialANSYS Fluent 3D CFD: Chevron Nozzle - Jet Engine (B787) Acoustics Tutorial!ANSYS: Rocket Nozzle FSI (coupled Thermal Structural) & Harmonic Analysis TutorialHow to Read and Use Joysticks in MATLAB and Simulink - Step-by-step detailed example!C++ and Qt Tutorial: Image Processing Application!MATLAB & Simulink Tutorial - Design a Simple Autopilot (with Flight Simulation!)Two Stage Rocket , NEUDOSE Satellite Launch (telemetry) - MATLAB / SimulinkArduino: How to build a Radar/Sonar with a User Interface Heads Up Display using C++ and Qt!Simulink Code Generation Tutorial: Transform the models into custom C++ applicationsDesign a Trajectory for Rocket Landing | C++ and Qt Application!PyTorch to C++ | Converting and Running Neural Networks | Tutorial (LibTorch / ONNX)Guidance, Navigation and Control Engineering explained in 49 seconds!
VDEngineering |

Data Structures: Delete a node from N-ary tree | C++ Tutorial

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER