Operating System

Showing posts with label Binary Search. Show all posts
Showing posts with label Binary Search. Show all posts

Thursday, April 16, 2015

In Binary Search,if the middle element (mid) is greater than key element then key element has to present in range of ?

Leave a Comment
In Binary Search,if the middle element (mid) is greater than key element then key element has to present in range of ?
low=mid-1
high=mid+1
high=mid-1
low=high-1
Read More

In Binary Search , which will be the scenario for Average Case performance ?

1 comment
In Binary Search , which will be the scenario for Average Case performance ?
The 'Mid key’ is present, but it’s not the middle element O(logn).
The ‘input key’ is present, but it’s not the middle element O(logn).
The ‘Last key’ is present, but it’s not the middle element O(logn).
The ‘First key’ is present, but it’s not the middle element O(logn).
Read More

Binary Search divides the list of elements in what form

2 comments
Binary Search divides the list of elements in what form
lower/2 
lower -higher/2 
lower+higher/2 
higher/2
Read More

In Binary Search,if the middle element (mid) is less than key element then key element has to present in range of ?

2 comments
In Binary Search,if the middle element (mid) is less than key element then key element has to present in range of ?
low=mid+2
low=mid+1
low=mid+2/1
low=mid+1*10
Read More

In Binary Search , which will be the scenario for Best Case performance ?

Leave a Comment
In Binary Search , which will be the scenario for Best Case performance ?
The middle element is equal to the ‘input key’ O(2).
The middle element is equal to the ‘input key’ O(1).
The middle element is equal to the ‘input key’ O(4).
The middle element is equal to the ‘input key’ O(3).
Read More