Given the head of a singly linked list whose elements are arranged in ascending order, convert it into a height-balanced binary search tree and return the root of the resulting tree.
A height-balanced binary search tree is one where the depth of the two subtrees of every node never differs by more than
Constraints:
head
Node.val
Given the head of a singly linked list whose elements are arranged in ascending order, convert it into a height-balanced binary search tree and return the root of the resulting tree.
A height-balanced binary search tree is one where the depth of the two subtrees of every node never differs by more than
Constraints:
head
Node.val