πŸ“’ Too many exams? Don’t know which one suits you best? Book Your Free Expert πŸ‘‰ call Now!

  • google app store apple app store
  • βœ–

      Question

      The time complexity of searching in a hash table with

      chaining is:
      A O(1) average, O(n) worst-case Correct Answer Incorrect Answer
      B O(log n) average, O(n) worst-case Correct Answer Incorrect Answer
      C O(n) always Correct Answer Incorrect Answer
      D O(n log n) average Correct Answer Incorrect Answer
      E O(1) always Correct Answer Incorrect Answer

      Solution

      Hashing allows constant-time access on average, but collisions can lead to O(n) in worst cases.

      Practice Next
      ask-question