Aug 11 (edited) • Questions
Favorite Interview Questions:
**Basics**: Given a binary tree write a function to release the tree without using recursion.
**Context**: This is deep in the OS so recursion or dynamic memory allocation for control flow is not allowed. You have been given a dynamic data object that contains data about a resource in the OS. It is no longer being used and must thus be released.
struct Node
{
Node* left;
Node* right;
int. data; // For interview just an integer. Don''t worry about it.
}
void releaseTree(Node* root)
{
// Write this part.
///
}
3
4 comments
Gone Gone
2
Favorite Interview Questions:
powered by
Computer Science
skool.com/computer-science-5993
A skool community for computer science students looking to learn, grow and share knowledge.
Build your own community
Bring people together around your passion and get paid.
Powered by