Dry run below algorithm and find the item (55) in the following array (C). Also write the name of the given algorithm. 0 1 C- 10 3 4 5 7 89 15 26 55 44 43 34 Igorithm -) Search (C, item) >) low = 0 =) high =n-1 1) while (low shigh) low + high =) mid = | 2 if (item = C[mid]) then print ('Search is Successful') else if (item < C[mid]) then high=mid -1 else low = mid +1 -> nrint ("Search is unSuccessful")

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 17RQ
icon
Related questions
Question
Dry run below algorithm and find the item (55) in the following array (C).
Also write the name of the given algorithm.
0 1
89 15
3
4
5
6
7
C=| 10
26
55
44
43
34
Igorithm
-) Search (C, item)
-) low =0
=) high=n-1
E) while (low s high)
low + high
mid =
2
if (item = C[mid]) then
print ('Search is Successful')
else if (item < C[mid]) then
high = mid -1
else low = mid +1
=) print ("Search is unsuccessful")
Transcribed Image Text:Dry run below algorithm and find the item (55) in the following array (C). Also write the name of the given algorithm. 0 1 89 15 3 4 5 6 7 C=| 10 26 55 44 43 34 Igorithm -) Search (C, item) -) low =0 =) high=n-1 E) while (low s high) low + high mid = 2 if (item = C[mid]) then print ('Search is Successful') else if (item < C[mid]) then high = mid -1 else low = mid +1 =) print ("Search is unsuccessful")
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Quicksort
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage