The Great Tree-List Recursion Problem. Read Courses Practice Improve Improve Improve Like Article Like Save Article Save Report issue Report Asked by Varun Bhatia. Question: Write a recursive function treeToList(Node root) that takes an ordered binary tree and rearranges the internal pointers to make a circular doubly linked list out of the tree nodes. The”previous” pointers should be stored in the “small” field and the “next” pointers should be stored in the “large” field. The list should be arranged so that the nodes are in increasing order. Return the head pointer to the new list. This is very well explained and implemented at: Convert a Binary Tree to a Circular Doubly Link List References: http://cslibrary.stanford.edu/109/TreeListRecursion.html Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule. Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks! DSA in C++ DSA in Java DSA in Python DSA in JavaScript Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore. Last Updated : 10 Jan, 2023 Like Article Save Article Previous Josephus Circle implementation using STL list Next Clone a Linked List with next and Random Pointer Share your thoughts in the comments Add Your Comment Please Login to comment...