public TreeNode sortedListToBST(ListNode head) {
        if (head == null)
            return null;
        int len = 0;
        ListNode temp = head;
        node = head;
        while (temp != null) {
            ++len;
            temp = temp.next;
        }
        return build(0, len - 1);
    }