Single linked list reverse code updated.