answersLogoWhite

0

A null tree.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What is the height of a specific node in a tree data structure?

The height of a specific node in a tree data structure is the number of edges on the longest path from that node to a leaf node.


What are primary data structure?

A primary data structure is a data structure that is created without the use of other data structures, whereas a secondary data structure relies on a primary data structure. A data structure is an organized collection of data elements.[NOTE: Be careful not to confuse the term data structure with the term data type. It is a common mistake. This answer addresses dat structures. Often people who ask about primary data structures or primitive data structures are really asking about primitve data types.]Here is an example where an array is a primary data structure and a binary tree is a secondary data structure based on the array:An array is a primary data structure -- it is a set of sequentially numbered data elements, such as an array of integers or an array of names -- name0, name, name2, ...A binary tree is a data structure where each element (called a node) has a data component and pointers to it's left and right sub-trees. [Think of a directory of folders, but each folder can only have two sub-folders.] We can create an and store an array of nodes to set up the tree in languages like C++ or Java.The root of the tree could be node 1 in the array, it would point to nodes 2 and 3. node 2 would point to nodes 4 and 5, while node 3 would point to nodes 6 and 7 .. and so on. generally node n point to nodes 2n and 2n+1. (You can start with node 0, but the math is a little easier if you start with node 1.)The binary tree in this case is the secondary data structure, while the undelying array is the primary data structure.


What is self referential structure?

It is exactly what it sounds like: a structure which contains a reference to itself. A common occurrence of this is in a structure which describes a node for a linked list. Each node needs a reference to the next node in the chain. struct linked_list_node { int data; struct linked_list_node *next; // <- self reference };


What is the difference between traversal and search?

Traversal simply means moving from one node to the next. Generally one searches by traversing the list, comparing each node's data with a given datum, either to return a pointer to a single matching node, or to return a list of matching nodes (copied from the list being searched), or simply to collect data about the matching nodes (such as a count of all the matching nodes).


What is heterogeneous linked list?

Heterogeneous Linked List is a linked list data-structure that contains or is capable of storing data for different datatypes.void pointer is basically used in these types of linked list as we are not sure of which type of data needs to be stored


Can structure contain a pointer itself?

Yes a simple exp is the link list. struct node { int data; struct node *link; }


What is physical data structure and logical data structure?

Physical data structure: This is the physical equipment involved in the network eg router, cabling etc). Logical data structure: This is how the information flows internally and externally (the transfer of information from one node to another on the network).


What is a header node in c plus plus?

A header node, or head node, is a node that marks the start of a series of nodes, usually as part of a list or queue structure. The head node is often a sentinal that holds no data of its own. Sentinels are used to simplify algorithms by ensuring that a list can never be empty, even when it has no data.


What is a binary tree?

A binary tree is a data structure consisting of binary nodes. A binary node is a data structure with two branches, each of which may hold a reference to another binary node. These branches are known as the left and right branches respectively. Since the nodes maintain references to every other node in the tree, it is only necessary to keep track of the root node.


What is an alternative approach to implementing the Dijkstra algorithm without utilizing the decrease key operation?

One alternative approach to implementing the Dijkstra algorithm without using the decrease key operation is to use a data structure called a bucket queue. This data structure allows for efficient updates of node priorities without the need for the decrease key operation.


What do nodes do?

In programming a node is a pointer to some data. For instance, if we allocate objects non-contiguously we can treat them as if they were allocated contiguously by storing pointers to those objects in a contiguous array: foo* a[100]; for (int i=0; i<100; ++i) a[i] = malloc (sizeof(foo)); In the above example we have an array of foo nodes. The foo objects themselves are individually allocated on the heap but they need not be allocated contiguously. But this does not matter because an array is always allocated contiguously so the order of the objects is determined by the order of the nodes in the array. If we change the order of the nodes, we change the order of the objects, but the objects don't actually move. This is useful when the objects are large or complex because it means we can change their order much more efficiently just by moving the nodes. As well as pointers, a node can also be defined as a structure: struct node { foo* data; node* next; }; Here, the node still points to an object but also points to another node, the next node in the sequence. In this case we don't need an array, we simply need to keep track of the first node in the sequence. This means we are no longer restricted by the array length; we can have as many or as few nodes as we require. Changing the order of the nodes is simply a matter of changing which data element each node points to. We can also insert and extract elements from the sequence by changing which node each node points to. More complex data structures require additional node pointers. For instance, a bi-directional list requires two node pointers, one to the next element in the sequence and one to the previous element: struct node { foo* data; node* next; node* prev; }; A binary tree node also has two node pointers: struct node { foo* data; node* left; node* right; }; A binary tree node might also point to its parent node: struct node { foo* data; node* parent; node* left; node* right; }; A tertiary node has at least three node pointers: struct node { foo* data; node* left; node* middle; node* right; }; Nodes make it possible to construct highly-complex data structures regardless of where the data is physically allocated and the order in which it is allocated. The point is that we don't need to move any data around because the nodes themselves define the data structure. The nodes can be thought of as being metadata (data about data). Any node that allows traversal to any other node in the structure can be used to keep track of the structure, however we typically use the node that provides the most efficient traversal. In a tree structure, that is always the root node. In a list, it is the head node.


What is the difference between binary tree and tree data structure?

binary tree is a specific tree data structure where each node can have at most 2 children nodes. In a general Tree data structure nodes can have infinite children nodes.