127. Delete the First Node
Foundation1000 ms256 MBSolved by 0%
Build the list, remove its first node, and print what remains.
If the list is already empty, print Empty. If removing the node leaves nothing, also
print Empty.
Constraints - `0 ≤ n ≤ 100000` - `-1000000 ≤ value ≤ 1000000`
Input
The first line contains an integer n, the number of nodes.
The second line contains n space-separated integers — the node values from head to tail.
The starter code builds the list for you; work on the nodes, not the array.
Output
Print the resulting list from head to tail on ONE line, separated by single spaces, or Empty if no nodes remain.
Input4
1 2 3 4
Output2 3 4
Noteremoves the front of an ordinary list
Input1
7
OutputEmpty
Noteremoves the only node, leaving an empty list
Hint 1Approach
Hint 2Approach
Hint 3Pseudocode
Hint 4Full solution