SarthakKeshari / CPP-Questions-and-Solutions

This repository aims to solve and create new problems from different spheres of coding. A path to help students to get access to solutions and discuss their doubts.
MIT License
47 stars 132 forks source link

Reverse a linked list using recursion #389

Closed KAUSHIK-DEKA closed 2 years ago

KAUSHIK-DEKA commented 2 years ago

Issue Id you have worked upon - Issue no #374

Reverse a linked list using recursion in cpp

Briefly explain your program logic -

The idea is to recall the reverse function recursively till the temporary node points to NULL

Screenshots(Attach 2 screenshots of your own input and output) -

image

image


Checklist:

Eg - If your code follow the below guidelines. Kindly change [] to [x]

All the conditions should be fulfilled for considering your code for merging -