Given a linked list, arrange the linked list in the manner of alternate last and first. Make sure to update the node's position instead of just updating the values.
example: Input: 1->2->3->4->5->6->7->8 Output: 8->1->7->2->6->3->5->4
Answers
Answered by
0
Answer:
input 10-11-15-13
output 10-13-11-15
Similar questions