📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!

  • google app store apple app store
  • ✖

      Question

      What is the primary disadvantage of using a singly

      linked list compared to an array for random access (e.g., accessing the 50th element)?
      A Higher memory overhead due to pointers Correct Answer Incorrect Answer
      B O(1) insertion at the beginning Correct Answer Incorrect Answer
      C O(n) time complexity for access Correct Answer Incorrect Answer
      D Difficulty in implementing deletion Correct Answer Incorrect Answer
      E Lack of dynamic sizing Correct Answer Incorrect Answer

      Solution

      Unlike arrays which offer O(1) random access, a singly linked list requires traversal from the head to reach the nth element, resulting in O(n) time complexity for random access.

      Practice Next
      ask-question