Tuesday, September 11, 2018

Leetcode 109. Convert sorted list to binary search tree

Sept. 11, 2018

Introduction


It is important to share my C# code on Leetcode discuss. I did spend time to learn again the bottom up approach by iterating the linked list one by one, and then construct binary search tree bottom up.

It is not easy to reason that the binary search tree can be constructed this way. Specially think in recursive function. I like to add some comment to remind myself that inorder traversal is applied in the function.

My sharing 


Here is the link I shared on Leetcode discuss.


No comments:

Post a Comment