Math, asked by dipakpatekar3107, 1 year ago

Find target element in array where array is divided into number of buckets

Answers

Answered by ItsCuteBoy
0

Answer:

If the array is not sorted then you have to search for the element by iteration ,linear search . There is no better way than O(n).Although if you're searching multiple times, it would be better if you sort ( O(nlogn)) it and then use binary search to make the following searches fast in O(log(n)).

Similar questions