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


    Question

    Consider a singly linked list: 1 -> 2 -> 3 -> 4 -> None.

    If a delete_node(head, 3) function is called (which deletes the node with value 3), what will be the state of the linked list after the operation?
    A 1 -> 2 -> 4 -> None Correct Answer Incorrect Answer
    B 1 -> 2 -> 3 -> None Correct Answer Incorrect Answer
    C 1 -> 4 -> None Correct Answer Incorrect Answer
    D 2 -> 3 -> 4 -> None Correct Answer Incorrect Answer
    E 1 -> 2 -> None Correct Answer Incorrect Answer

    Solution

    The correct answer is A

    Practice Next
    ask-question