C# Program For Printing Reverse Of A Linked List Without Actually Reversing Last Updated : 23 Jul, 2025 Comments Improve Suggest changes Like Article Like Report Given a linked list, print reverse of it using a recursive function. For example, if the given linked list is 1->2->3->4, then output should be 4->3->2->1.Note that the question is only about printing the reverse. To reverse the list itself see this Difficulty Level: Rookie Algorithm: printReverse(head) 1. call print reverse for head->next 2. print head->data Implementation: C# // C# program to print reverse // of a linked list using System; public class LinkedList { // Head of list Node head; // Linked list Node class Node { public int data; public Node next; public Node(int d) { data = d; next = null; } } // Function to print reverse // of linked list void printReverse(Node head) { if (head == null) return; // print list of head node printReverse(head.next); // After everything else is printed Console.Write(head.data + " "); } // Utility Functions // Inserts a new Node at front // of the list. public void push(int new_data) { /* 1 & 2: Allocate the Node & Put in the data*/ Node new_node = new Node(new_data); // 3. Make next of new Node as head new_node.next = head; // 4. Move the head to point to // new Node head = new_node; } // Driver code public static void Main(String []args) { // Let us create linked list 1->2->3->4 LinkedList llist = new LinkedList(); llist.push(4); llist.push(3); llist.push(2); llist.push(1); llist.printReverse(llist.head); } } // This code is contributed by Rajput-Ji Output: 4 3 2 1 Time Complexity: O(n) Space Complexity: O(n) for call stack since using recursion Please refer complete article on Print reverse of a Linked List without actually reversing for more details! Comment More infoAdvertise with us Next Article C++ Program For Reversing A Linked List In Groups Of Given Size - Set 1 K kartik Follow Improve Article Tags : C# Linked Lists Microsoft Practice Tags : Microsoft Similar Reads Javascript Program For Printing Reverse Of A Linked List Without Actually Reversing Given a linked list, print reverse of it using a recursive function. For example, if the given linked list is 1->2->3->4, then output should be 4->3->2->1.Note that the question is only about printing the reverse. To reverse the list itself see this Difficulty Level: Rookie Algorit 2 min read Print reverse of a Linked List without actually reversing Given a singly linked list. The task is to print the linked list in reverse order without actually reversing the linked list.Examples: Input: head : 1 -> 2 -> 3 -> 4 -> NULL Output: 4 -> 3 -> 2 -> 1 -> NULLInput: head: 1 -> 2 -> 3 -> 4 -> 5 -> NULL Output: 5 - 8 min read C++ Program For Reversing A Linked List In Groups Of Given Size - Set 1 Given a linked list, write a function to reverse every k nodes (where k is an input to the function). Example: Input: 1->2->3->4->5->6->7->8->NULL, K = 3 Output: 3->2->1->6->5->4->8->7->NULL Input: 1->2->3->4->5->6->7->8->NULL, 3 min read Menu driven program for all operations on singly linked list in C A Linked List is a linear data structure that consists of two parts: one is the data part and the other is the address part. In this article, all the common operations of a singly linked list are discussed in one menu-driven program.Operations to be PerformedcreateList(): To create the list with the 8 min read Cpp14 Program For Printing Nth Node From The End Of A Linked List (Duplicate) Given a Linked List and a number n, write a function that returns the value at the n'th node from the end of the Linked List.For example, if the input is below list and n = 3, then output is "B" Recommended: Please solve it on "PRACTICE" first, before moving on to the solution. Method 1 (Use length 5 min read Reverse nodes of a linked list without affecting the special characters Given a linked list of alphabets and special characters. Reverse the given linked list without affecting the position of the special characters. Examples: Input: g -> @ -> e -> # -> e -> $ -> k -> s -> NULL Output: s -> @ -> k -> # -> e -> $ -> e -> g - 12 min read Like