diff --git a/src/common/merge_sort.cairo b/src/common/merge_sort.cairo index cd988cc37..72e05f709 100644 --- a/src/common/merge_sort.cairo +++ b/src/common/merge_sort.cairo @@ -12,8 +12,7 @@ fn merge_sort, +Drop, +PartialOrd>(arr: Array) -> Array } // Create left and right arrays - let middle = len / 2; - let (left_arr, right_arr) = arr.split(middle); + let (left_arr, right_arr) = arr.split(len / 2); // Recursively sort the left and right arrays let sorted_left = merge_sort(left_arr);