MuleSoft interview question

reverse a linked list