threaded binary trees

threaded binary trees

1st Grade

10 Qs

quiz-placeholder

Similar activities

Computer and it's parts

Computer and it's parts

1st Grade

15 Qs

Social media marketing

Social media marketing

1st - 10th Grade

14 Qs

Adopt me

Adopt me

KG - Professional Development

14 Qs

Files and Documents Computer Basics

Files and Documents Computer Basics

KG - 8th Grade

15 Qs

Pengantar Literasi Digital (Internet)

Pengantar Literasi Digital (Internet)

1st Grade

10 Qs

Grade 2 - MS Word Interface

Grade 2 - MS Word Interface

1st - 4th Grade

10 Qs

Computer Intro-Final Review 1

Computer Intro-Final Review 1

KG - University

10 Qs

Konsep Routing

Konsep Routing

1st - 10th Grade

10 Qs

threaded binary trees

threaded binary trees

Assessment

Quiz

Computers

1st Grade

Practice Problem

Hard

Created by

vijay bhaskar uppari

Used 14+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a threaded binary tree traversal?


a) a binary tree traversal using stacks

b) a binary tree traversal using queues

c) a binary tree traversal using stacks and queues

d) a binary tree traversal without using stacks and queues

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are null nodes filled with in a threaded binary tree?



a) inorder predecessor for left node and inorder successor for right node information

b) right node with inorder predecessor and left node with inorder successor information

c) they remain null

d) some other values randomly

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are double and single threaded trees?



a) when both left, right nodes are having null pointers and only right node is null pointer respectively

b) having 2 and 1 node

c) using single and double linked lists

d) using heaps and priority queues

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How to search for a key in a binary search tree?

public Tree search(Tree root, int key) { if( root == null || root.key == key ) { return root; } if( root.key < key ) { return search(root.right,key); } else return search(root.left,key);

public Tree search(Tree root, int key) { if( root == null || root.key == key ) { return root; } if( root.key < key ) { return search(root.left,key); } else return search(root.right,key); }

public Tree search(Tree root, int key) { if( root == null) { return root; } if( root.key < key ) { return search(root.right,key); } else return search(root.left,key);

public Tree search(Tree root, int key) { if( root == null) { return root; } if( root.key < key ) { return search(root.right.right,key); } else return search(root.left.left,key);

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the speciality about the inorder traversal of a binary search tree?



a) It traverses in a non increasing order

b) It traverses in an increasing order

c) It traverses in a random fashion

d) It traverses based on priority of the node

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following piece of code do?

public void func(Tree root)

{

func(root.left());

func(root.right());

System.out.println(root.data());

}

a) Preorder traversal


b) Inorder traversal

c) Postorder traversal

d) Level order traversal

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

1. Which of the following is false about a binary search tree?



a) The left child is always lesser than its parent

b) The right child is always greater than its parent

c) The left and right sub-trees should also be binary search trees

both a and b are correct

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?