CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
3
You visited us 3 times! Enjoying our articles? Unlock Full Access!
Question

Let P be an array containing n integers. Let t be the lowest upper bound on the number of comparisons of the array elements, required to find the minimun and maximum values in an arbitrary array of n elements. Which one of the following choices is correct?

A
t > 2n - 2
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
t>3[n2] and t 2n - 2
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
t > n and t3[n2]
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
t > log2(n) and t n
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is C t > n and t3[n2]
Using divide and conquer min-max algo , w number of comparisons =3n22.

Hence 3n22 will lie in the range of n to 3[n2].
Hence option (a) is the correct answer.

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Factorising Numerator
QUANTITATIVE APTITUDE
Watch in App
Join BYJU'S Learning Program
CrossIcon