VibraXX
Live Quiz Arena
🎁 1 Free Round Daily
⚡ Enter Arena
HomeCategoriesLogic & PuzzlesQuestion
Question
Logic & Puzzles

A database search algorithm is designed to locate a specific record among 'n' entries. What happens to the worst-case execution time as 'n' doubles?

A)Remains constant: O(1)
B)Increases linearly: O(n)
C)Increases logarithmically: O(log n)
D)Increases quadratically: O(n^2)

💡 Explanation

If a binary search algorithm is applied to a sorted database, its complexity is O(log n); because the search space halves with each step, therefore doubling 'n' increases the execution time by a logarithmic factor, rather than linearly or quadratically.

🏆 Up to £1,000 monthly prize pool

Ready for the live challenge? Join the next global round now.
*Terms apply. Skill-based competition.

⚡ Enter Arena

Related Questions

Browse Logic & Puzzles