diff --git a/2021/fjp1/l001.java b/2021/fjp1/l001.java index 106487f..b1d949e 100644 --- a/2021/fjp1/l001.java +++ b/2021/fjp1/l001.java @@ -124,7 +124,7 @@ public ListNode mergeKLists(ListNode[] lists, int si, int ei) { if (si == ei) return lists[si]; - int mid = (si + ei) / 2; + int mid = si + (ei-si)/2; ListNode l1 = mergeKLists(lists, si, mid); ListNode l2 = mergeKLists(lists, mid + 1, ei); return mergeTwoLists(l1, l2); @@ -141,4 +141,4 @@ public static void main(String[] args) { } -} \ No newline at end of file +}