Q2 (20 points): Linked-Lists
Consider the following four (4) linked-list methods (Assume they are implemented and ready
to be used as specified below):
insert_at_position takes a position (int) value and a node, and it inserts the new node at that
position in the list including the first and last positions.
peek_at_position takes a position (int) value and it returns the data stored in the node at that
position in the list including the first and last positions.
delete_from_position takes a position (int) value and it deletes a node located at that
position in the list including the first and last positions.
list_size returns the current size of the linked-list.
Using ONLY the above 4 methods, write detailed English-like pseudocode or Java-Like code
for a new linked-list method, call it move_node (...), to move a node from one position to
another in the same linked-list. The specification of this new method is:
METHOD move_node (int P1, int P2);
where P1 is the removal position and P2 is the insertion position.
Your pseudocode code must be detailed, logically correct, and complete. Check for all special
cases including the validation of the position values.