Multiple Choice Questions On Tree Data Structures | letsbug

 

MCQs On Tree Data - Structure

1. Children of same parent are called _____.

  1.  Node 
  2.  Child Node
  3. Sibling 
  4.  None of these

Answer: 3 : Sibling

2. The number of edges from the node to the deepest leaf is called _____ of the tree.

  1. Height 
  2. Depth
  3. Length
  4. Width

Answer: 1 : Height

3. The number of edges from the root to the node is called ______ of the tree.

  1.  height
  2. Depth
  3. Length
  4. Width

Answer: 2 : Depth

4. Consider the following tree:

                        1
                    /       \
                2               3
            /      \        /      \ 
          4         5    6         7

5.  If the postorder traversal gives (ab - cd *+) then the label of the nodes 1, 2, 3, 4, 5, 6 will be _______.

  1. +, -, *, a, b, c
  2. a, -, b, +, c, *, d
  3. a, b, c, d, -, *, +
  4. -, a, b, +, *, c, d

Answer: 3 : a, b, c, d, -, *, +

6. The indegree of ______ of a tree is always zero. 

  1. any node
  2. a branch node
  3. the root node 
  4. a leaf node

Answer: 4 : a leaf node

7. A list of integers is read in, one at a time and a binary search tree is constructed. Next the tree is traversed and the integers are printed. Which traversal would print result in the original order of input?

  1. preorder
  2. postorder
  3. inorder
  4. none of the above

Answer: 2 : postorder

8. A binary tree T has n leaf nodes. The number of nodes of degree 2 in T is _____.

  1. log 2 n
  2. n - 1
  3. 2 ^ n

Answer: 2 : n - 1

9. A binary tree in which every non-leaf node has non-empty left and right subtree is called strictly binary tree. Such a tree with 10 leaves _____. 

  1. cannot have more than 1 nodes
  2. has exactly 19 nodes
  3. has exactly 17 nodes 
  4. cannot have more than 17 nodes

Answer: 1 : cannot have more than 1 nodes

10. The depth of complete binary tree with n nodes is _______.

  1. log 2 (n + 1) - 1
  2. log 2 n
  3. log 2 (n - 1 ) + 1
  4. log 2 n + 1

Answer: 4 : log 2 n + 1

11. The number of binary tree with 2 nodes which when traversed in postorder gives the sequence A, B, X is 

  1. 3
  2. 9
  3. 7
  4. 5

Answer: 4 : 5

Comments

  1. There are different equipment and chemicals that are present in any research lab. The devices are necessary in order to conduct different essential experiments. A chemistry lab cannot function effectively Buy MDMA without lab equipment as it would not be possible to undertake the required experiments.

    ReplyDelete

Post a Comment

Categories

Big Data Analytics Binary Search Binary Search Tree Binary To Decimal binary tree Breadth First Search Bubble sort C Programming c++ Chemical Reaction and equation class 10 class 10th Class 9 Climate Complex Numbers computer network counting sort CSS Cyber Offenses Cyber Security Cyberstalking Data Science Data Structures Decimal To Binary Development diamond pattern Digital Marketing dust of snow Economics Economics Lesson 4 Email Validation English fire and ice Food Security in India Footprints Without feet Forest And Wildlife Resources game Geography Geography lesson 6 glassmorphism Glossary Graph HackerRank Solution hindi HTML image previewer India-Size And Location Insertion Sort Internet Network Status Interview Questions Introduction to cyber crime and cyber security IT javascript tricks json to CSV converter lesson 2 lesson 1 lesson 2 Lesson 3 Lesson 6 lesson 7 Life lines of National Economy life processes Linear Search Linked List lowest common ancestor Machine Learning MCQs median in array Merge sort min and max of two numbers Moment Money and Credit My Childhood Natural Vegetation and Wildlife NCERT Network connectivity devices Network Models Network Security No Men Are foreign Node.js operator overloading P5.js PHP Physical features of India Population Prime Numbers python Quick sort R language Rain on the roof Regular Expression Resources and development reversing array saakhi science Searching Algorithm Selection sort Social Media Marketing social science Software Engineering Software Testing Sorting Algorithm Stacks staircase pattern System Concepts Text Recognition The last Leaf time converter Time Passed From A Date Todo List App Tree Trending Technologies Understanding Economic Development username and password video player Visualization water resources Wired And Wireless LAN साखी
Show more

Popular Posts

Big Data MCQs(multiple choice questions) with answers - letsbug

Digital Marketing MCQ(Multiple Choice Questions) with Answers | part 1 | letsbug

Software Engineering MCQs questions with answers - letsbug