Expedia Group interview question

Reverse a linked list in java