Sail E0 Webinar
Question
Given, arr = {1,3,5,6,7,9,14,15,17,19} key = 17 and delta = {5,3,1,0}
How many key comparisons are made?(exclude the comparison used to decide the left or right sub array)
Options:
A .  4
B .  3
C .  5
D .  6
Answer: Option B


Tracing with the above code, comparison #1: i=4, comparison #2: i=7, comparison #3: i=8



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers