Convert a Binary Tree to a Doubly Linked List
The structure of Node of a Binary Tree and Doubly linked list are same. struct Node { int data; Node* left; Node* right; } Structure of Node of a Binary Tree struct Node { int data; Node* previous; Node* next; } Structure of Node of a Doubly linked list If we treat […]
Reversing a doubly linked list
Given a doubly linked list. Write a function to reverse it. If given list is then output of our function should be