I am learning about different recursive approaches for reversing a linked list in C++. I have implemented both head and tail recursion methods, but I’m unsure about their differences and which one is more optimal.
Which type of recursion writing would be the optimized for reversing a linked list using recursion
1.Head recursion
2.Tail recursion
New contributor
Aman maurya is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.