96: Convert sorted linked list into a binary search tree

Given sorted linked list in ascending order, return a height-balanced binary search tree

Note: height-balanced binary tree is a binary tree in which the depth of the two subtrees of every node never differs by more than 1

 

Example 1

Input:    1 -> 2 -> 3

Output:      2
            / \
           1   3

Example 2

Input:    0 -> 1 -> 2 -> 3 

Output:       2
             / \
            1   3
           / 
          0 
Difficulty:Medium
Topic:Linked list
Problem #:96