• + 0 comments

    C#

    static void reversePrint(SinglyLinkedListNode llist)
        {
            if (llist.next == null)
            {
                if (llist.data != 0)
                {
                    Console.WriteLine(llist.data);
                }
                return;
            }
            else
            {
                reversePrint(llist.next);
                Console.WriteLine(llist.data);
            }
            
        }