dsa-11.7.24 an

dsa-11.7.24 an

University

10 Qs

quiz-placeholder

Similar activities

Comandos del CMD

Comandos del CMD

University

10 Qs

Sociedad del conocimiento _XC

Sociedad del conocimiento _XC

University

12 Qs

Examen Tema 1 - Simulación

Examen Tema 1 - Simulación

University

11 Qs

ADOBE PREMIERE

ADOBE PREMIERE

University

10 Qs

CSS (background-position-list)

CSS (background-position-list)

1st Grade - University

10 Qs

Quiz3_DivideConquer_GreedyApproach

Quiz3_DivideConquer_GreedyApproach

University

10 Qs

internet

internet

University

10 Qs

COMANDOS DE NAVEGAÇÃO DO NVDA

COMANDOS DE NAVEGAÇÃO DO NVDA

University

10 Qs

dsa-11.7.24 an

dsa-11.7.24 an

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

PUSHPALATHA C2114

Used 1+ 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

1.Consider a hash table of size seven, with starting index zero, and a hash function

(3x + 4)mod7. Assuming the hash table is initially empty, which of the following is the contents of the table when the sequence 1, 3, 8, 10 is

inserted into the table using closed hashing? Note that '_' denotes an empty location in the table.

  1. 8, , , , , _, 10

  1. 1, 8, 10, , , _, 3

  1. 1, , , , , _,3

  1. 1, 10, 8, , , _, 3

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

2.What maximum difference in heights between the leafs of a AVL tree is possible?

  1. log(n) where n is the number of nodes

  1. n where n is the number of nodes

  1. 0 or 1

  1. Atmost 1

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

3.We are given a set of n distinct elements and an unlabelled binary tree with n nodes. In how many ways can we populate the tree with the given set so that it becomes a binary search tree?

  1. 0

  1. 1

  1. n!

  1. 1/n+1

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

4.If h is chosen from a universal collection of hash functions and is used to hash n keys into a table of size m,

where n ≤ m, the expected number of collisions involving a particular key x is less than _______.

  1. 1

  1. 1/n

  1. 1/m

  1. n/m

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

5.Consider the below left-left rotation pseudo code where the node contains value pointers to left, right child nodes and a height value and Height() function returns height value stored at a particular node.

avltree leftrotation(avltreenode z): avltreenode w =x-left x-left=w-right w-right=x x-height=max(Height(x-left),Height(x-right))+1 w-height=max(missing)+1 return w


What is missing?

  1. Height(w-left), x-height

  1. Height(w-right), x-height

  1. Height(w-left), x

  1. Height(w-left)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

6.We are given a set of n distinct elements and an unlabelled binary tree with n nodes. In how many ways can we populate the tree with the given set so that it becomes a binary search tree?

  1. 0

  1. 1

  1. n!

  1. (1/(n+1)).2nCn

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

7.What is the maximum height of any AVL-tree with 7 nodes? Assume that the height of a tree with a single node is 0.

  1. 2

  1. 3

  1. 4

5

Create a free account and access millions of resources

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?