Question:

Consider the algorithm:
NameSearch (numList, key,n)
Step1: SET index = 0
Step2: WHILE index < n, REPEAT step3
Step3: IF numlist [index]-key THEN
                        PRINT "Element found at position", index + 1
                           STOP
             ELSE
                             index = index+1
Step4: PRINT "Search unsuccessfull"
The algorithm performs

Updated On: Oct 18, 2024
  • Random search
  • Search by hashing
  • Search by hashing
  • Binary search
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

The correct option is (D) :Binary search
Was this answer helpful?
0
0