Reverse LL (Recursive)

Given a linked list, reverse it using recursion.

You don't need to print the elements, just reverse the LL duplicates and return the head of updated LL.

Input format : Linked list elements (separated by space and terminated by -1)`

Sample Input 1 :
1 2 3 4 5 -1
Sample Output 1 :
5 4 3 2 1

Comments

Popular posts from this blog

Access and modify all the resources of our Wiki.js using WikiJS API

MySQL Multi Source Master Slave Replication using GTID

How to pass parameters in webhook?