A function to convert given BST to Doubly Linked List . left pointer is used as previous pointer and right pointer is used as next pointer . The function sets * head to povar to first and * tail to povar to last node of converted DLL
function convertBSTtoDLL ( root ) {