answersLogoWhite

0


Best Answer

Same as if two nodes are NOT equal in size. Size of nodes has nothing to do where to insert a new element. The insertion should be applying the search algorithm of that binary tree (so the new inserted element maybe found later).

For balanced (in size) binary tree, the above still applied, because 50% of the time the tree is unbalanced (a binary tree with even number of elements is not balanced). Plus, those 2 nodes, may not be the "right" and "left" nodes of a given one, so 2 nodes equals in size has nothing to do with the way the elements being inserted into a binary tree.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Where to insert an element in binary tree if two nodes are equal in size?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

The height of Complete Binary tree is in terms of :option1. n2. logn3. n^2?

The height of a complete binary tree is in terms of log(n) where n is the number of nodes in the tree. The height of a complete binary tree is the maximum number of edges from the root to a leaf, and in a complete binary tree, the number of leaf nodes is equal to the number of internal nodes plus 1. Since the number of leaf nodes in a complete binary tree is equal to 2^h where h is the height of the tree, we can use log2 to find the height of a complete binary tree in terms of the number of nodes.


What is the height of binary search tree in worst case?

In the worst case a binary search tree is linear and has a height equal to the number of nodes. so h=O(h).


There are 8 15 13 14 nodes were there in 4 different trees Which of them could have formed a full binary tree?

In general: There are 2n-1 nodes in a full binary tree. By the method of elimination: Full binary trees contain odd number of nodes. So there cannot be full binary trees with 8 or 14 nodes, so rejected. With 13 nodes you can form a complete binary tree but not a full binary tree. So the correct answer is 15. niraj


What is the difference between strictly binary tree and complete binary tree?

Complete Binary tree: -All leaf nodes are found at the tree depth level -All nodes(non-leaf) have two children Strictly Binary tree: -Nodes can have 0 or 2 children


When we insert a new node in a binary search tree will it become an internal node or terminal node?

It will be come a terminal node. Normally we call terminal nodes leaf nodes because a leaf has no branches other than its parent.


What is the difference between extended binary tree and complete binary tree?

Complete Binary tree: All leaf nodes are found at the tree depth level and All non-leaf nodes have two children. Extended Binary tree: Nodes can have either 0 or 2 children.


A binary tree with 20 nodes has null branches equals?

A binary tree with n nodes has exactly n+1 null nodes or Null Branches. so answer is 21. MOHAMMAD SAJID


When converting binary tree into extended binary tree all the original nodes in binary tree are?

will remain same


How many nodes are there in the nth of a binary tree?

If N>1, there are (2N-1) - (2N-1-1), otherwise, 1 nodes in the Nth level of a balanced binary tree.


What is the minimum number of nodes in a binary tree of depth k?

if u assign a 0th level to root of binary tree then,the minimum no. of nodes for depth K is k+1.


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.


Number of possible binary tree with 3 nodes is?

12