Welcome to the daily solving of our PROBLEM OF THE DAY with Devashish Khare. We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Linked List but also build up problem-solving skills.
In this problem, we are given, a doubly linked list of n elements. Your task is to reverse the doubly linked list in place.
Example :
Input:
LinkedList: 3 <--> 4 <--> 5
Output: 5 4 3
Give the problem a try before going through the video. All the best!!!
Problem Link: https://www.geeksforgeeks.org/problems/reverse-a-doubly-linked-list/1