public ListNode mergeKLists(ListNode[] lists) {
        if (lists == null || lists.length == 0) return null;
        int left = 0, right = lists.length - 1;
        while (left < right) {
            while (left < right) {
                lists[left] = mergeTwoLists(lists[left], lists[right]);
                ++left;
                --right;
            }
            left = 0;
        }
        return lists[0];
    }