In-Lab5

In-Lab5

University

14 Qs

quiz-placeholder

Similar activities

Exploring C++, Data Structures, and HTML

Exploring C++, Data Structures, and HTML

12th Grade - University

10 Qs

Sorting Quiz

Sorting Quiz

University - Professional Development

15 Qs

Python Review Module 16 - Searching Sorting Algorithm

Python Review Module 16 - Searching Sorting Algorithm

University

17 Qs

Binary Search Tree and Hashing Quiz

Binary Search Tree and Hashing Quiz

University

15 Qs

أسئلة عن هياكل البيانات

أسئلة عن هياكل البيانات

University

12 Qs

Pertemuan - 7 Praktikum SDA

Pertemuan - 7 Praktikum SDA

University

10 Qs

AlgoWhiz Quiz

AlgoWhiz Quiz

University

15 Qs

Midterm 2 Quiz

Midterm 2 Quiz

University

16 Qs

In-Lab5

In-Lab5

Assessment

Quiz

Other

University

Medium

Created by

Tony Abi Haidar

Used 1+ times

FREE Resource

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of binary search on a sorted array?

O(1)

O(n log n)

O(log n)

O(n)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the depth of a leaf node in a tree?

Depth is undefined

2

0

1

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a binary search tree, the data in the left sub-tree is:

Less than or equal to the parent node

Greater than the parent node

Randomly distributed

Equal to the parent node

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the worst-case depth of a binary search tree when inserting elements in sorted order?

O(log n)

O(n log n)

O(1)

O(n)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which traversal method visits nodes in the order of left, root, right?

In-order

Level-order

Pre-order

Post-order

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'next' pointer in a binary search tree?

To point to the root node

To point to the maximum of the left subtree

To point to the minimum of the right subtree

To point to the parent node

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when you remove a node with two children in a binary search tree?

Replace it with its right child

Relabel it with the value of its in-order successor

Replace it with its left child

Simply delete the node

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?