[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Trees Questions

Home > Technical Aptitude > Data Structures > Trees > General Questions
NA
SHSTTON
451
Solv. Corr.
417
Solv. In. Corr.
868
Attempted
0 M:33 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

Answer: Option A

Explanation:

5 8

Workspace

NA
SHSTTON
732
Solv. Corr.
1023
Solv. In. Corr.
1755
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);

Answer: Option D

Explanation:

A


Workspace

NA
SHSTTON
259
Solv. Corr.
505
Solv. In. Corr.
764
Attempted
0 M:14 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

Answer: Option D

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
241
Solv. Corr.
790
Solv. In. Corr.
1031
Attempted
0 M:50 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

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
149
Solv. Corr.
501
Solv. In. Corr.
650
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

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
171
Solv. Corr.
378
Solv. In. Corr.
549
Attempted
0 M:14 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.

Cthreaded tree.

Dcomplete binary tree.

Answer: Option A

Explanation:

Option A is full binary tree while

Option D should be correct as the given statement matches the definition"A complete binary tree is a binary tree in which all the levels are completely filled except possibly the lowest one, which is filled from the left. A complete binary tree is just like a full binary tree, but with two major differences. All the leaf elements must lean towards the left."

Workspace

NA
SHSTTON
282
Solv. Corr.
301
Solv. In. Corr.
583
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.

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
301
Solv. Corr.
571
Solv. In. Corr.
872
Attempted
0 M:16 S
Avg. Time

8 / 194

Choose the correct option.

The number of different directed trees with 3 nodes are


A2

B4

C3

D5

Answer: Option C

Explanation:

One configuration for simple Tree with 2 child

One configuration for Left Skew

One configuration for Right Skew

Workspace

NA
SHSTTON
229
Solv. Corr.
510
Solv. In. Corr.
739
Attempted
0 M:57 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

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

NA
SHSTTON
328
Solv. Corr.
506
Solv. In. Corr.
834
Attempted
0 M:27 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

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Data Structures Trees Questions and Answers pdf

At Data Structures topic Trees page No: 1 you will find list of 10 practice questions, tips/trick and shortcut to solve questions, solved questions, quiz, and download option to download the whole question along with solution as pdf format for offline practice. You can practice all the listed Data Structures Trees topic questions offline too, by downloading the MCQs practice question of Trees with detail solution, with formula/Tips & Tricks, with Solved examples and with top-rated users answers, which will give you best answer ascross webs. It is one of the perfect Trees e-book pdf covering all types of questions in detail. These Data Structures test with answers pdf cover all types of question asked in IIFT, XAT, SNAP, GRE, GMAT, NMAT, CMAT, MAT or for IT companies written exam like Wipro, HCL, Infosys, Accenture, Government exams, IBPS Exams etc. There are multiple formats to download your online free Data Structures Trees e-book, like fully solved, unsolved questions with Answers sheet. Even you can customize your ebook format by adjusting the given options in the download section to make it your one of the best Data Structures topic-based ebook. It is recommended to bookmark this page Data Structures Trees for your preparation. Most of the students and fresher candidates finding it hard to clear the Data Structures section in exams. Here Given Trees practice questions, quiz, fully solved questions, tips & trick and Mock tests, which include question from each topic will help you to excel in Trees. Each test has all the basics questions to advanced questions with answer and explanation for your clear understanding, you can download the test result as pdf for further reference.

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 Trees Customize Online Mock Test

This is own type of mock test, where At this Data Structures Trees MCQs mock test section, you will able to attempt only the questions related to Trees, in that question will be a different level, important, and all the questions will be part of some of the mock tests across Q4interview FREE Mock test. You need to choose the topic as Trees, and click on Double click to generate your customize mock test. While attempting the mock test you need to choose any of the one options out of given option. It is recommended to go through the direction given along with each question, as these questions will be randomly and so that same direction will not be applicable across the entire test. Once you submit your mock test, the result will be generated for Trees Customize mock test, where your performance point points will be highlighted. Q4interview analysis every single point which helps you to improve your topic understanding and help you to know your type of mistakes and way to improve Trees questions, by providing the same type of practice questions from practice exercise. The best part of this Trees, all these mock tests listed here are free and you can take as Many time, as many you want. When you continue to give Trees Customize Online Mock Test here regularly, then you will understand how much you have developed your accuracy on a topic, after that you will be able to decide how much attention you need to focus on. Your continued practice will increase your confidence, speed and thinking ability intensely, the Trees Customize topic on which you will practice more will beneficial for you in future during campus placement.Trees Mock Tests

Data Structures Trees Quiz Online Test

The details of the Data Structures Trees 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 Trees that you see and keep them in mind while answering questions.

Data Structures Trees MCQs Practice Questions with Answer

On this Trees 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 Trees 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 Trees solved examples question

Clarity of concepts is a must if you want to master the skill of solving Data Structures problems. This page contains sample Data Structures Trees questions and answers for freshers and competitive exams. Trees Questions with the detailed description, the explanation will help you to master the topic. Here solved examples with detailed answer description, explanations are given and it would be easy to understand. How to solve qTreesData Structures? Here are some examples solved with the Common Rules/tricks/tips of Data Structures. Enhance your chance to score maximum marks in Data Structures sections through. Error Spotting Grammar Questions Online Test for Free. Fully solved Sentence Formation MCQs questions with detailed answer description. Data Structures is an important topic for any exams but most aspirants find it difficult. You need to learn various tricks tips, rules, etc to solve quickly. At this page, you will find frequently asked Trees questions or problems with solutions, shortcuts, formulas for all-important competitive exams like IT companies exams, interviews. It is always a best practice to go through the example and understand the types of question and way to solve it, so let's do some examples to calculate efficiency, read through all the given here solved examples. You can post your solution, tips, trick and shortcut if you have any in respect to questions.

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.