You are on page 1of 6

DATA STRUCTURE UNIT-4 QUIZ

Questions:-

1) The operation of arranging a set of data in


some given order is known as:

A) Merging
B) Sorting
C) Array
D) Linked list

2) If all the data that is to be sorted can be


adjusted at a time in main memory, which
type of sorting is used,

A) Internal sorting
B) External sorting
C) Bubble sorting
D) None of the above

3) An operation which finds the


place of a given element in the list is
known as:

A) Sorting
B) Merging
C) Searching
D) None of the above

4) A simple sorting algorithm that repeatedly


steps through the list, compares adjacent
elements and swaps them if they are in the
wrong order is known as:

A) Shell sort
B) Heap sort
C) Selection sort
D) Bubble sort

5) A sort algorithm that repeatedly searches


remaining items to find the least one and
moves it to its final location is known as:
A) Heap sort
B) Shell sort
C) Selection sort
D) Radix sort

6) A sorting algorithm in which the elements


are transferred one at a time to the right
position:

A) Binary tree sorting


B) Merge sorting
C) Insertion sorting
D) None of the above

7) An integer sorting algorithm that sorts data


with integer keys by grouping the keys by
individual digits that share the same
significant position and value (place value).

A) Heap sort
B) Shell sort
C) Selection sort
D) Radix sort

8) A sorting technique is based on the


insertion sort.

A) Heap sort
B) Shell sort
C) Selection sort
D) Radix sort

9) A sorting algorithm that works by first


organizing the data to be sorted into a
special type of binary tree is called:

A) Heap sort
B) Shell sort
C) Selection sort
D) Radix sort

10) A sorting algorithm which uses divide and


conquer method:

A) Heap sort
B) Shell sort
C) Selection sort
D) Merge sort

11) The process of checking every element in


the list sequentially until the desired
element is found.

A) Linear search
B) Binary search
C) Indexed sequential search
D) None of the above

12) An algorithm used to locate a specified


value within an array.

A) Binary search
B) Linear search
C) Sequential search
D) None of the above

13) One of the most efficient sorting


algorithms and is based on the splitting
of an array into smaller ones:

A) Merge sort
B) Quick sort
C) Bubble sort
D) Radix sort

14) What is the time complexity of linear


search:

A) O(n)
B) O(n²)
C) O(log n)
D) None of the above

15) What is the time complexity of binary


search in best case performance is:
A) O(log n)
B) O(n²)
C) O(n³)
D) O(1)

16) what is the time complexity for Bubble


sort algorithm:

A) O(log n)
B) O(n²)
C) O(n³)
D) O(1)
17) What is the best case time complexity for
Quick sort algorithm:

A) O(log n)
B) O(n²)
C) O(nlog n)
D) O(n³)

18) what is the time complexity for radix sort


algorithm:

A) O(nk)
B) O(n+k)
C) O(n)
D) O(1)

19) what is the worst case time complexity for


shell sort algorithm:

A) O(log n)
B) O(n log n)
C) On(log n²)
D) O(log n²)

20) what is the time complexity for heap sort


algorithm:

A) O(log n)
B) O(n log n)
C) On(log n²)
D) O(log n²)

21) what is the space complexity for heap


sort algorithm:

A) O(log n)
B) O(n²)
C) O(n³)
D) O(1)

22) what is the space complexity for quick


sort algorithm:

A) O(n log n)
B) O(n log n²)
C) O(n³)
D) O(log n)

23) what is the space complexity for merge


sort algorithm:

A) O(log n)
B) O(n)
C) O(n²)
D) O(n³)

24) What is the space complexity for radix


sort algorithm:

A) O(nk)
B) O(n+k)
C) O(n)
D) O(1)

25) what is the space complexity for binary


tree sort:

A) O(nk)
B) O(n+k)
C) O(n)
D) O(1)

Answer key:-
1) sorting (b)
2) Internal sorting (a)
3) Searching (c)
4) Bubble sort (d)
5) Selection sort (c)
6) Insertion sorting (c)
7) Radix sort (d)
8) Shell sort (b)
9) Heap sort (a)
10) Merge sort (d)
11) Linear search (a)
12) Binary search (a)
13) Quick sort (b)
14) O(n) (a)
15) O(1) (d)
16) O(n²) (b)
17) O(n log n) (c)
18) O(nk) (a)
19) On(log n²) (c)
20) O(n log n) (b)
21) O(1) (d)
22) O(n log n) (a)
23) O(n) (b)
24) O(n+k) (b)
25) O(n) (c)

You might also like