Skip to content

Commit 0a160d9

Browse files
author
ghost
committed
reverted change
1 parent 78a9550 commit 0a160d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/thealgorithms/sorts/LinkListSort.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ void task1(int[] n, int s, int m, int e) {
208208
while (j <= e) {
209209
b[k++] = n[j++];
210210
}
211-
if (e + 1 - s >= 0) {
212-
System.arraycopy(b, s - s, a, s, e + 1 - s);
211+
for (int p = s; p <= e; p++) {
212+
a[p] = b[p - s];
213213
}
214214
}
215215
// The method task and task1 is used to sort the linklist using merge sort

0 commit comments

Comments
 (0)