Loading...
Loading...
Loading...
A list holds product codes. Remove the first node whose value equals the target, if any, and print the list. Print EMPTY if no nodes remain.
Example 1
Input
1 5 2 5 5
Output
1 2 5
Example 2
Input
4 4
Output
EMPTY
Try the problem first. Open one hint at a time.
Stop on the node before the target, then skip over it.
A dummy node makes removing the head work like any other node.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor