ServiceNow Interview Question

reverse of a linked list