menu
Qammunity
Login
Register
My account
Edit my Profile
Private messages
My favorites
Ask a Question
Questions
Unanswered
Tags
Categories
Ask a Question
what is the best way of deleting all the nodes in a binary tree pointed to by the root pointer? group of answer choices delete root; root
asked
Aug 11, 2024
133k
views
4
votes
what is the best way of deleting all the nodes in a binary tree pointed to by the root pointer? group of answer choices delete root; root
Computers and Technology
high-school
Mastov
asked
by
Mastov
8.6k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
3
votes
Traverse the tree and delete each node individually.
Adam Stanley
answered
Aug 18, 2024
by
Adam Stanley
8.3k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
Related questions
asked
Oct 8, 2020
99.0k
views
Consider the following code which deletes all the nodes in a linked list. void doublyLinkedList::destroy() { nodeType *temp; //pointer to delete the node while (first != nullptr) { temp = first; first
Mateusz Kocz
asked
Oct 8, 2020
by
Mateusz Kocz
8.1k
points
Computers and Technology
high-school
1
answer
4
votes
99.0k
views
asked
Dec 10, 2024
232k
views
What is the consequence of deleting a pointer after accessing it and making changes? a) No impact b) Causes a segmentation fault c) Improves memory efficiency d) Enhances pointer performance
Delinear
asked
Dec 10, 2024
by
Delinear
7.3k
points
Computers and Technology
high-school
1
answer
0
votes
232k
views
asked
Jan 13, 2024
133k
views
Assume that for some binary tree node implementation, a pointer requires 4 bytes and a data object requires 14 bytes. Further assume that we are storing a Full binary tree, that the internal nodes are
Schernichkin
asked
Jan 13, 2024
by
Schernichkin
8.2k
points
Computers and Technology
high-school
1
answer
2
votes
133k
views
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.4m
questions
12.2m
answers
Other Questions
“What does it mean when we “rework” copyrighted material?”
The book shows how to add and subtract binary and decimal numbers. However, other numbering systems are also very popular when dealing with computers. The octal (base 8) numbering system is one of these.
Seven basic internal components found in a computer tower
Disadvantages of using animation in advertising? advantages and disadvantages of using animation for education? advantages and disadvantages of using animation in entertainment?
Explain why binary codes are used to represent characters, numbers and symbols :)
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search Qammunity