print linklist in reverse order using three methods