mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-07 17:56:02 +08:00
chore: enforce InsertNewlineAtEOF
in clang-format
(#4343)
* style: insert newline at eof * style: use `InsertNewlineAtEOF` in `clang-format` * fix: use `clang-format-16` * chore: update clang-format-lint-action to v0.16.2 --------- Co-authored-by: Debasish Biswas <debasishbsws.dev@gmail.com>
This commit is contained in:
@ -98,4 +98,4 @@ public class AllPathsFromSourceToTarget {
|
||||
return nm;
|
||||
// returns all possible paths from source to destination
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,4 +26,4 @@ public class ArrayCombination {
|
||||
}
|
||||
return Combination.combination(arr, length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -25,4 +25,4 @@ public class IndexOfRightMostSetBit {
|
||||
|
||||
return index;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,4 +9,4 @@ public class IsEven {
|
||||
public static boolean isEven(int number) {
|
||||
return (number & 1) == 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,4 +14,4 @@ public class NonRepeatingNumberFinder {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10,4 +10,4 @@ public class NumbersDifferentSigns {
|
||||
public static boolean differentSigns(int num1, int num2) {
|
||||
return (num1 ^ num2) < 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,4 +17,4 @@ public class ReverseBits {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -111,4 +111,4 @@ public class LeftistHeap {
|
||||
lst.add(n.element);
|
||||
in_order_aux(n.right, lst);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -109,4 +109,4 @@ public class Fibonacci {
|
||||
int nthTerm = (int) ((Math.pow(phi, n) - Math.pow(-phi, -n)) / squareRootOf5);
|
||||
return nthTerm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -126,4 +126,4 @@ public class OptimalJobScheduling {
|
||||
public int getCost(int process, int machine) {
|
||||
return Cost[process][machine];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,4 +17,4 @@ public class PowerUsingRecursion {
|
||||
// Recurse with a smaller exponent and multiply with base
|
||||
return base * power(base, exponent - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -51,4 +51,4 @@ public class PreemptivePriorityScheduling {
|
||||
|
||||
return ganttChart;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -103,4 +103,4 @@ public class DualPivotQuickSort implements SortAlgorithm {
|
||||
/*
|
||||
* References: https://www.geeksforgeeks.org/dual-pivot-quicksort/
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
@ -58,4 +58,4 @@ public class StringCompression {
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user