Home Tags Posts tagged with "Recursion"
Tag:

Recursion

Algorithms involving recursion

  • Question: Print the Linked List in reverse order. The actual structure of the Linked List must remain intact. Input: 4, 8, 15, 16, 23, 42 Output: 42, 23, 16, 15, 8, 4 We just discussed how to reverse a Linked List in an older post. Reverse a singly Linked List. But, in the above described method we changed the entire structure of the Linked List, the last node was no longer the last node and the head node had also changed. We might encounter cases, where we just need to…

    0 FacebookTwitterLinkedinWhatsappEmail

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More