Рет қаралды 12,452
In this video we are solving a popular Facebook interview question: Convert BST to Sorted Doubly Linked List (leetcode # 426).
At first glance this problem is really easy as you can simply do an inorder traversal to parse out all the elements and then link them using a for loop but the problem challenges us to do it in-place which means we have to do the linking as we perform the inorder traversal, adding a bit of a twist to the question. Stay tuned to find out how to solve this interesting question!
If you enjoyed the video and got some value from it, then consider dropping a subscription to my channel and helping me reach my goal of 1000 subscribers!