Live Quiz Arena
🎁 1 Free Round Daily
⚡ Enter ArenaQuestion
← Logic & PuzzlesA 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.
Related Questions
Browse Logic & Puzzles →- An engineer is designing a compiler that translates regular expressions into finite automata. If the regular expression contains nested quantifiers, which effect dominates during automaton construction?
- A university club with 12 members needs to form a committee of 4. Which mechanism calculates the total number of possible unique committees?
- Which mechanism ensures the integrity of data transmitted over a network using cryptographic hashing?
- If a chemical plant uses a formal logic system to verify the safety of its control procedures, which consequence follows if the axioms of the system are inconsistent?
- If a cryptographic key's modulus (n) is factored into primes p and q, which vulnerability becomes prominent when p and q are close?
- When scheduling tasks on a processor core, why does simply summing task durations incorrectly estimate total runtime if some tasks access shared memory resources?
