Single Choice Easy

QWhat is the time complexity of the binary search algorithm?

ID: #5728 Divide and Conquer 275 views
Question Info
#5728Q ID
EasyDifficulty
Divide and ConquerTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A O(n)
  • B O(n log n)
  • C O(log n)
  • D O(n^2)
Correct Answer

Explanation

Answer: O(log n)

Explanation: The binary search algorithm has a time complexity of O(log n), which is considered efficient. It involves repeatedly dividing the search space in half until the target value is found or determined to not exist.

Share This Question

Challenge a friend or share with your study group.