In a list of array of integers, how will you determine the location for any specific integer, say like X?
Using the binary search option the location for any particular integer can be distinguished. The number can be compared in between array along with X and if the value is equal then the search is complete. If the number gets better then we have to search through the other half in the array. If the very much smaller. this process can be repeated until the search results get appropriate and half of the array is compared in between the center of the array along with x. This search can actively be narrowed by utilizing the factors and it is to be repeated until the value of x is found. The algorithm for the same consumes 0(log n) time.
BY Best Interview Question ON 17 Oct 2019