Samsung Electronics Interview Question

Convert leaf nodes of a BST into linked list