Kaar Technologies interview question

reverse a linked list(both double,single)