Dell Technologies interview question

Write an algorithm to reverse a one direction linked list.