answersLogoWhite

0


Best Answer

This would be just a single node, since no edges (you can think of degree as the number of edges connected to a node). If you are talking about the in-degree, or out-degree of a node being zero, this can happen many times in a directed graph (in-degree = # edges going IN to node, out-degree = # edges going out...).

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: If the degree of a node is 0 then the tree is called?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Why don't we allow a minimum degree of B-Tree is 1?

One important property of a B-Tree is that every node except for the root node must have at least t-1 keys where t is the minimum degree of the B tree. With t-1 keys, each internal node will have at least t children [Cormen et al., Introduction To Algorithms Third Edition, MIT Press, 2009 p. 489].If we allow a minimum degree of 1, then each internal node will have 1-1=0 keys!


Program to count number of leaf node in binary tree in c plus plus?

Add the following recursive method to your binary tree's node class: size_t Node::count_leaves() { if (!left && !right) return 1; // this node is a leaf size_t count = 0; if (left) count += left-count_leaves(); // count leaves on left if (right) count += right-leaves(); // count leaves on right; return count; // return total leaves. } To count the leaves of the entire tree, call the method on the root node of the tree. To count the leaves of a subtree, call the method on the root node of the subtree.


Program for count the total number of node in binary tree?

The number of nodes in any subtree is the number of nodes in its left subtree, plus the number of nodes in its right subtree, plus one, so you can use a recursive algorithm and start at the root.unsigned intbinarytree_count_recursive(const node *root){unsigned int count = 0;if (root != NULL) {count = 1 + binarytree_count_recursive(root->left)+ binarytree_count_recursive(root->right);}return count;}


Difference between height of a tree and depth of a tree and level of a tree?

The height of a tree is the longest path from the root to a leaf, counting the number of edges. The depth of a tree is the longest path from the root to a leaf, counting the number of nodes. The level of a tree refers to the depth of a node with respect to the root, where the root is considered to be at level 0.


What is 0 degree line called?

the equator


What is 0 degree latitiude called?

poof


Write a programme segment to find out the total number of nodes in a tree?

This can be achieved with a recursive-traversal function starting at the root.Binary tree nodes use the following shorthand form (using tertiary conditional operator):int Node::GetNodeCount(){return( 1 +( left ? left.GetNodeCount() : 0 ) +( right ? right.GetNodeCount() : 0 ));}Or in longhand:int Node::GetNodeCount(){// Always include self in countint count = 1;// Is there a left node?if( left )// Increment the count with a recursive traversal.count += left.GetNodeCount();// Is there a right node?if( right )// Increment the count with another recursive traversal.count += right.GetNodeCount();// Return the total count to the caller.return( count );}Tree nodes with variable child nodes (lists of lists) use the following longhand form:int Node::GetNodeCount(){// Always include self in count.int count = 1;// Start with this node's head node (the first child node).Node node = head;// Iterate through all child nodes.while( node ){// Increment the count with a recursive call.count += node.GetNodeCount();// Traverse to the next child node.node = node.next;}// Return the total count to the caller.return( count );}


How do you represent binary tree using array?

The root of the tree is stored in array element [0]; for any node of the tree that is stored in array element [i], its left child is stored in array element [2*i], its right child at [2*i+2]


What is 0 degree angle is called?

A straight line


What do you call a 0 degree angle?

A 0 degree is a angle called a straight line but 180 degree is a straight line too. So cool yeah


What is the lines of latitude called?

The 0 degree line of Latitude is called the Equator.


How to write a program to implement a binary search tree in C?

struct node{ int data; struct node *left, *right; }; typedef struct node node; non recursive method : main() { node * root = NULL , *new = NULL *temp1 =NULL , * temp2 = NULL; int num =1; printf(" Enter the elements of the tree( enter 0 to exit)\n"); while(1) { scanf("%d", &num); if(num==0) break; new = malloc(sizeof(node)); new->left = new->right = NULL; new->data = num; if( root NULL) root->left = new; else insert( new,root->left); } }