public static BinarySearchTree <T> GetBstFromSortedList(SinglyLinkedList <T> sortedList) { int n = sortedList.GetCount(); SllNode <T> head = sortedList.Head; BinaryTreeNode <T> root = BinarySearchTree <T> .GetBstFromSortedListInternalUtil(ref head, n); return(new BinarySearchTree <T>(root)); }