Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 776 Bytes

module04-quiz.md

File metadata and controls

31 lines (25 loc) · 776 Bytes

Module 4: Linked Lists

Topics Covered:

  • Basic Linked List operations
  • Fast and slow pointers
  • Reversing a Linked List

Key Problems:

  • Middle of the Linked List
  • Remove Duplicates from Sorted List
  • Reverse Linked List II

Quiz:

  1. What is the time complexity for finding the middle of a linked list using the fast and slow pointer technique?

    • a) O(n)
    • b) O(log n)
    • c) O(n^2)
    • d) O(1)
  2. Which operation is most efficient in a singly linked list?

    • a) Finding the middle element
    • b) Reversing the list
    • c) Deleting a node at the head
    • d) Inserting a node at the end
  3. How do you detect a cycle in a linked list?

    • a) Using a hash table
    • b) Using two pointers (fast and slow)
    • c) Sorting the list
    • d) Recursion