Computer Science, asked by vamshianjuru, 11 months ago

write a java program to reverse the link using recursion​

Answers

Answered by parry8016
2

write a java program to reverse the link using recursion

  1. Input : Head of following linked list
  2. 1->2->3->4->NULL
  3. Output : Linked list should be changed to,
  4. 4->3->2->1->NULL
  5. Input : Head of following linked list
  6. 1->2->3->4->5->NULL
  7. Output : Linked list should be changed to,
  8. 5->4->3->2->1->NULL
  9. Input : NULL
  10. Output : NULL
  11. Input : 1->NULL
  12. Output : 1->NULL
Similar questions