Question
Explain implementation of deletion from a binary tree.

Answers

To implement the deletion from a binary tree, there is a need to consider the possibilities of deleting the nodes.
They are:
- Node is a terminal node: In case the node is the left child node of its parent, then the left pointer of its parent is set to NULL. In all other cases, if the node is right child node of its parent, then the right pointer of its parent is set to NULL.

- Node has only one child: In this scenario, the appropriate pointer of its parent is set to child node.

- Node has two children: The predecessor is replaced by the node value, and then the predecessor of the node is deleted.   Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q What job did Ernest Hemmingway do in WW1
  • Q What are the major influences that encourage you to take a job?
  • Q Recently we remembered Birsa Munda. He had died in mysterious circumstances in 1900 in Ranchi Jail on what date?
  • Q What type of insurance policies are there?
  • Q Union Minister of Law?
  • Q Ad hoc Judges can be appointed to the Supreme Court
  • Q Write Short Notes on Astaxanthin
  • Q What are the various changes between the rails version 2 and 3?
  • Q What are the key principles when designing a software for performance efficiency ?
  • Q At what rate firms are required to pay tax on their income?
  • Q In the series 0, 3, 8, 15,__ What is the next number?