mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-27 06:23:08 +08:00
style: enable NeedBraces
in checkstyle (#5227)
* enable style NeedBraces * style: enable NeedBraces in checkstyle --------- Co-authored-by: Samuel Facchinello <samuel.facchinello@piksel.com>
This commit is contained in:

committed by
GitHub

parent
51fcc66345
commit
87b17e0571
@ -56,7 +56,9 @@ public final class QuickSelect {
|
||||
|
||||
private static <T extends Comparable<T>> int selectIndex(List<T> list, int left, int right, int n) {
|
||||
while (true) {
|
||||
if (left == right) return left;
|
||||
if (left == right) {
|
||||
return left;
|
||||
}
|
||||
int pivotIndex = pivot(list, left, right);
|
||||
pivotIndex = partition(list, left, right, pivotIndex, n);
|
||||
if (n == pivotIndex) {
|
||||
|
Reference in New Issue
Block a user