Tag Archives: doubly-linkedlist

Extract Leaves of a Binary Tree in a Doubly Linked List : GeeksforGeeks

Problem link: http://www.geeksforgeeks.org/connect-leaves-doubly-linked-list/

Problem Statement:
Given a Binary Tree, extract all leaves of it in a Doubly Linked List (DLL). Note that the DLL need to be created in-place. Assume that the node structure of DLL and Binary Tree is same, only the meaning of left and right pointers are different. In DLL, left means previous pointer and right means next pointer.
Continue reading