Expedia Group Interview Question

Reverse a linked list in java