mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-27 06:23:08 +08:00
Add automatic linter (#4214)
This commit is contained in:
@ -15,7 +15,6 @@ public class Median {
|
||||
public static double median(int[] values) {
|
||||
Arrays.sort(values);
|
||||
int length = values.length;
|
||||
return length % 2 == 0 ? (values[length / 2] + values[length / 2 - 1]) / 2.0
|
||||
: values[length / 2];
|
||||
return length % 2 == 0 ? (values[length / 2] + values[length / 2 - 1]) / 2.0 : values[length / 2];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user