Computer Science, asked by shikhakaur235, 1 year ago

The searching technique that takes o (1) time to find a data is

Answers

Answered by Anonymous
1
binary search .......
Answered by Jasleen0599
0

Binary Search

The searching technique that takes o (1) time to find a data is Binary Search.

  • Binary search has a best-case temporal complexity of O. (1). Average Case Complexity - For a binary search, the average case time complexity is O. (logn). The worst case scenario for binary search is when we have to continuously narrowing the search space until there is just one element.
  • Consequently, the worst-case complexity of binary search tree searching is O. (n). Time complexity is typically O(h), where h is the height of BST.
  • The space complexity in an iterative Binary Search implementation will be O (1). This is so that we can keep track of the variety of elements that need to be checked, which requires two variables. No other information is required. The space complexity of a recursive Binary Search implementation will be O (logN).
  • A binary search method operates on the principle that half of the list should be ignored after each iteration. It divides the list repeatedly until it locates the value it seeks in the given list. A rapid improvement over a straightforward linear search method is a binary search algorithm.

#SPJ2

Similar questions