Search Header Logo

DSA QUIZ-2

Authored by k. sriram reddy

Computers

Professional Development

DSA QUIZ-2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following is not a stable sorting algorithm?

Bubble Sort

Merge Sort

Insertion Sort

Selection Sort

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Running merge sort on an array of size n which is already sorted is

O(n)

O(logn)

O(n logn)

O(n^2)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the situation in which assignment operation is very costly. Which of the following sorting algorithm should be performed so that the number of assignment operations is minimized in general?

Insertion sort

Heap Sort

Selection sort

None

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The lower bound on the number of comparisons performed by comparison-based sorting algorithm is

Ω (1)

Ω (n)

Ω (nlogn)

Ω (n2)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a limitation of binary search algorithm?

must use a sorted array

requirement of sorted array is expensive when a lot of insertion and deletions are needed

there must be a mechanism to access middle element directly

binary search algorithm is not efficient when the data elements more than 1500.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

State True or False for internal sorting algorithms.

i) Internal sorting are applied when the entire collection if data to be sorted is small enough that the sorting can take place within main memory.

ii) The time required to read or write is considered to be significant in evaluating the performance of internal sorting.

i-True, ii-True

i-True, ii-False

i-False, ii-True

i-False, ii-False

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The height of a BST is given as h. Consider the height of the tree as the no. of edges in the longest path from root to the leaf. The maximum no. of nodes possible in the tree is?

2^(h-1) -1

2^(h+1) -1

2^h +1

2^(h-1) +1

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?