alt_rev.cpp working for linked list with even number of nodes