Altimetrik interview question

implement linked list and reverse it