Shrink and Expand Linked List
CodeChefOpen on judge ↗
Implement a singly linked list with the following operations. - $I$ $x$ – Inserts element $x$ as a first element in the linked list. - $S$ $x$ $y$ – Shrinks the linked list in between the element $x$ and the element $y$, if the element $x$ exists before the element $y$. Otherwise, shrinks the linked list in between the element $y$ and the element $x$ after updating the existing linked list to its
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start