Please enter your email address or userHandle.
Given a Singly Linked List of size N, delete all alternate nodes of the list.
Explanation: Deleting alternate nodes
results in the linked list with elements
Your task is to complete the function deleteAlt() which takes the head of the linked list in the input parameter and modifies the given linked list accordingly.
Expected Time Complexity: O(N).
Expected Auxiliary Space: O(1).
We strongly recommend solving this problem on your own before viewing its editorial. Do you still
want to view the editorial?
Login to access your submissions.