Question: Below algorithm performs a search operation. Fill in the blanks to complete the pseudocode. //key is the element being searched in the array, arr.

Below algorithm performs a search operation. Fill in the blanks to complete the pseudocode. //key is the element being searched in the array, arr. //the default value of left = 0 and right length of the array def find(key, arr, left, right): pos (left right)/2 if(key arr[ pos ]) return pos; = 2: if( else: return find(key, arr, left, pos-1)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
