Data Structures :: Trees

Home > Technical Aptitude > Data Structures > Trees > General Questions
NA
SHSTTON
146
Solv. Corr.
120
Solv. In. Corr.
266
Attempted
1 M:1 S
Avg. Time

1 / 194

Choose the correct option.

What are the number of nodes of left and right sub-tree of the binary tree if the data is inserted in the following order:\r\n 45, 15, 8, 5 6, 5, 65, 47, 12, 18, 10, 73, 50, 16, 61

A7 6

B6 7

C8 5

D5 8

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
99
Solv. Corr.
133
Solv. In. Corr.
232
Attempted
0 M:0 S
Avg. Time

2 / 194

Choose the correct option.
Consider the following code segment in C to traverse a binary tree using the preorder

typedef struct tree {
int info;
struct  *left;
struct  *right;
}node;

void preorder(node *tree)
{
if (t)
{
Statementl
Statement2
Statement3
}
}
The above Statements should be

Apreorder(tree->right); preorder(tree->left); printf("%d", tree->info);

Bpreorder(tree->left); preorder(tree->right); printf("%d", tree->info);

Cpreorder(tree->left); printf("%d", tree->info); preorder(tree->right);

Dprintf("%d", tree->info); preorder(tree->left); preorder(tree->right);

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
101
Solv. Corr.
205
Solv. In. Corr.
306
Attempted
0 M:8 S
Avg. Time

3 / 194

Choose the correct option.

The worst case time complexity of AVL tree is better in comparison to binary search tree for

ASearch and Insert Operations

BSearch and Delete Operations

CInsert and Delete Operations

DSearch, Insert and Delete Operations

Explanation:

Search is O(log N) since AVL trees are always balanced. Insertion and deletions are also O(logn) where as in case of BST it is O(n).

Workspace

NA
SHSTTON
76
Solv. Corr.
186
Solv. In. Corr.
262
Attempted
0 M:48 S
Avg. Time

4 / 194

Choose the correct option.

A full binary tree with 2n+1 nodes contain

An leaf nodes

Bn non-leaf nodes

C(n-1) leaf nodes

D(n-1) non-leaf nodes

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
50
Solv. Corr.
182
Solv. In. Corr.
232
Attempted
0 M:0 S
Avg. Time

5 / 194

Choose the correct option.

If a node in a BST has two children, then its inorder predecessor has

Ano left child

Bno right child

Ctwo children

Dno child

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
75
Solv. Corr.
134
Solv. In. Corr.
209
Attempted
0 M:0 S
Avg. Time

6 / 194

Choose the correct option.

A binary tree in which if all its levels except possibly the last, have the maximum number of nodes and all the nodes at the last level appear as far left as possible, is known as

Afull binary tree.

BAVL tree.

Dcomplete binary tree.

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
87
Solv. Corr.
118
Solv. In. Corr.
205
Attempted
0 M:0 S
Avg. Time

7 / 194

Choose the correct option.

A full binary tree with n leaves contains

An nodes.

B(log2 n)nodes.

C(2n-1) nodes.

D2^n nodes.

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
58
Solv. Corr.
150
Solv. In. Corr.
208
Attempted
0 M:6 S
Avg. Time

8 / 194

Choose the correct option.

The number of different directed trees with 3 nodes are

A2

B4

C3

D5

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
49
Solv. Corr.
151
Solv. In. Corr.
200
Attempted
1 M:39 S
Avg. Time

9 / 194

Choose the correct option.

One can convert a binary tree into its mirror image by traversing it in

Ainorder

Bpreorder

Cpostorder

Dany orde

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
78
Solv. Corr.
112
Solv. In. Corr.
190
Attempted
0 M:0 S
Avg. Time

10 / 194

Choose the correct option.

The number of leaf nodes in a complete binary tree of depth d is

A2^d

B[2^(d-1)]+1

C[2^(d+1)]+1

D(2^d)+1

Explanation:

Here is no explanation for this answer

Workspace

Data Structures Trees Questions and Answers pdf

At Data Structures topic Trees, you will get multiple online quiz difficulty wise, which will have a total of 6 quizzes, categorized as easy, medium, and moderate level. While preparing for any Trees, take all the list quiz and check your preparation level for that topic. Each quiz have 10 different question, which needs to be answered in 20 min., all the listed quiz here is free, however, you will get only one chance for each quiz to attempt(Take Quiz seriously), so it is always recommended to take one quiz in each section before you start solving Trees MCQs practice question, and one after solving all the question of the respective level, you can refer back your Trees quiz result any time or you can download it as pdf for reference.

Data Structures Quiz Online Test

The details of the Data Structures quiz are as follows. There are 10 questions for you. You have to answer them in 20 minutes. Within 20 minutes you have to see the errors in the sentences given as a question. Four options are also given to you, and you have to choose your opinion. You must be confident in your answer that the choices are difficult. Therefore, below we provide you with some information about Data Structures that you see and keep them in mind while answering questions.

Data Structures MCQs Practice Questions with Answer

On this section of page you will find the easiest quickest ways to solve a question, formulas, shortcuts and tips and tricks to solve various easiest methods to solve Data Structures Question Quickly. It contains all the Data Structures topic Trees questions which are common in any of the preliminary exams of any company. The solution is provided along with the questions. The practice of these questions is a must as they are easy as well as scoring and asked in all the exams They will confirm the selection if all the questions attempted wisely with little practice. It is recommanded to Take Mock test based on Data Structures topic and Trees topic based quiz.

Data Structures solved examples question

You can get here fully solved Trees examples with a detailed answer and description. You can solve Trees problems with solutions, the questions by companies wise by filtering the questions, additionally, you can check what type of questions are being asked in IT companies Written Round from Trees. Trees became one of the most important sections in the entire competitive exams, Companies Campus, and entrance online test. Go through Trees Examples, Trees sample questions. You can Evaluate your level of preparation in Trees by Taking the Q4Interivew Trees Online Mock Test based on most important questions. All the Trees practice questions given here along with answers and explanations are absolutely free, you can take any number of time any mock Test.

Why Data Structures Trees?

In this practice section, you can practice Data Structures Questions based on "Trees" and improve your skills in order to face the interview, competitive examination, IT companies Written exam, and various other entrance tests (CAT, GATE, GRE, MAT, Bank Exam, Railway Exam etc.) with full confidence.

Where can I get Data Structures Trees questions and answers with explanation?

Q4Interview provides you lots of fully solved Data Structures (Trees) questions and answers with Explanation. Solved examples with detailed answer description, explanation are given and it would be easy to understand. You can download Data Structures Trees quiz questions with answers as PDF files and eBooks.

Where can I get Data Structures Trees Interview Questions and Answers (objective type, multiple-choice, quiz, solved examples)?

Here you can find objective type Data Structures Trees questions and answers for interview and entrance examination. Multiple choice and true or false type questions are also provided.