Searching and Sorting questions

Q40

GATE DA 2024 DASearching and SortingMCQ2 marks−2/3 if wrong

Report a problem with Q40

What is wrong?
Let F(n)F(n) denote the maximum number of comparisons made while searching for an entry in a sorted array of size nn using binary search.

Which ONE of the following options is TRUE?
Show answer without attempting

Loading the answer…

Q45

GATE DA 2024 DASearching and SortingMCQ2 marks−2/3 if wrong

Report a problem with Q45

What is wrong?
Consider the following sorting algorithms:

(i) Bubble sort
(ii) Insertion sort
(iii) Selection sort

Which ONE among the following choices of sorting algorithms sorts the numbers in the array [4, 3, 2, 1, 5] in increasing order after exactly two passes over the array?
Show answer without attempting

Loading the answer…

0/20 correct0 marks

Related topics in Programming Data Structures and Algorithms