0% found this document useful (0 votes)
6 views5 pages

QUIZ PollingQuestions

The document contains a series of quiz questions related to searching and sorting algorithms, including linear and binary search complexities, as well as various sorting algorithms like selection, bubble, and insertion sort. It covers topics such as time complexity, data structures, and specific characteristics of algorithms. Each question is followed by the correct answer, providing a comprehensive overview of fundamental concepts in computer science.

Uploaded by

nanikartik13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views5 pages

QUIZ PollingQuestions

The document contains a series of quiz questions related to searching and sorting algorithms, including linear and binary search complexities, as well as various sorting algorithms like selection, bubble, and insertion sort. It covers topics such as time complexity, data structures, and specific characteristics of algorithms. Each question is followed by the correct answer, providing a comprehensive overview of fundamental concepts in computer science.

Uploaded by

nanikartik13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

# DAYWISE QUIZ(Polling Questions) : Searching & Sorting

Q. In a linear search algorithm, worst case occures:


A. If the key element is exist at first position in a collection/list.
B. If the key element is exist at last position in a collection/list.
C. If the key element does not exist in the list.
D. If either the key element exist at last position or does not exist in the
list.
Answer: D

Q. What is an asymptotic average case time complexity of a linear search


algorithm?
A. O(n)
B. O(n/2)
C. θ(n)
D. θ(n/2)
E. Both C & D
Answer: C

Q. An average case time complexity of a binary search algorithm is:


A. O(log n)
B. O(n)
C. θ(log n/2)
D. θ(log n)
Answer: D

Q. There is a need of data structure in programming to achieve:


A. Encapsulation
B. Abstraction
C. Polymorphism
D. All of the above
E. None of the above
Answer: B

Q. What is an asymptotic lower bound for binary search algorithm?


A. O(log n)
B. Ω(n)
C. θ(log n)
D. Ω(log n)
E. None of the above
Answer: E
Hint: Asymptotic lower bound of binary search i.e. best case time
complexity of binary search algorithm is: Ω(1)

Q. Which of the following sorting algorithm is an efficient for smaller


input size array?
A. Selection Sort
B. Bubble Sort
C. Insertion Sort
D. Quick Sort
Answer: C

Q. Which of the following sorting algorithm is an efficient for larger input


size array?
A. Selection Sort
B. Bubble Sort
C. Insertion Sort
D. Quick Sort
Answer: D.

Q. In which of following sorting algorithm elements which are at two


consecutive positions gets compared?
A. Selection Sort
B. Bubble Sort
C. Insertion Sort
D. Quick Sort
Answer: B

Q. In which of the following sorting algorithms magnitudes of time


complexities are same in all the cases ?
A. Selection Sort
B. Bubble Sort
C. Insertion Sort
D. Merge Sort
E. Both C & D
F. Both A & D
Answer: F

Q. Which of the following sorting algorithm works efficiently for already


sorted input sequence?
A. Selection Sort
B. Bubble Sort
C. Insertion Sort
D. Both B & C
E. None of the above
Answer: C

Q. ______________ Sort is also reffered as Sinking Sort.


A. Selection Sort
B. Bubble Sort
C. Insertion Sort
D. None of the above
Answer: B

Q. In which of the following algorithm divide-and-conquer stratergy is not


used?
A. Binary Search
B. Merge Sort
C. Insertion Sort
D. Quick Sort
E. None of the above
Answer: C

Q. Which of the following algorithm is simple to implement?


A. Selection Sort
B. Bubble Sort
C. Insertion Sort
D. Both A & B
E. All of the above
F. None of the above
Answer: D

Q. In Selection Sort algorithm, what will the array status after 3 iterations
for given input: 30 20 60 50 10 40.
A. 10 20 30 40 50 60
B. 10 30 20 40 50 60
C. 10 20 30 60 50 40
D. 10 20 30 50 60 40
Answer: C

Q. In Bubble Sort algorithm, what will the array status after 3 iterations for
given input: 30 20 60 50 10 40.
A. 20 10 30 40 50 60
B. 30 10 20 40 50 60
C. 30 20 10 50 40 60
D. None of the above
Answer: A

Q. In a selection sort max ____ no. of iterations are required to sort all
array elements.
A. n
B. n+1
C. n-1
D. 2n
Answer: C

Q. Which of the following statement is false about an array data structure?


A. Array elements can be accessed by using random access which is faster
access.
B. Array is static
C. Array is a linear data structure
D. Addition and deletion operations are efficient on an array data structure.
Answer: D

Q. Which of the following algorithm/s cannot be applied on a linked list?


A. Linear Search
B. Binary Search
C. Quick Sort
D. Merge Sort
E. Both A & B
F. Both B & C
Answer: F

You might also like