mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-28 06:55:02 +08:00
style: include MAC_MANUAL_ARRAY_COPY
(#5199)
This commit is contained in:
@ -34,9 +34,7 @@ public final class BFPRT {
|
||||
|
||||
public static int[] copyArray(int[] arr) {
|
||||
int[] copyArr = new int[arr.length];
|
||||
for (int i = 0; i < arr.length; i++) {
|
||||
copyArr[i] = arr[i];
|
||||
}
|
||||
System.arraycopy(arr, 0, copyArr, 0, arr.length);
|
||||
return copyArr;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user