Sail E0 Webinar
Question
Choose among the following code for an iterative binary search.
Options:
A .  public static int iterative(int arr[], int key){
B .  public static int iterative(int arr[], int key){
C .  public static int iterative(int arr[], int key){
D .  None of the mentioned
Answer: Option B


Find the 'mid', check if it equals the key, if not, continue the iterations until low


Was this answer helpful ?

Submit Solution

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

Latest Videos

Latest Test Papers