diff --git a/checkstyle.xml b/checkstyle.xml index 4fc237d29c5a..40e107aa1798 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -137,7 +137,7 @@ - + diff --git a/src/main/java/com/thealgorithms/datastructures/graphs/WelshPowell.java b/src/main/java/com/thealgorithms/datastructures/graphs/WelshPowell.java index 0981638d4903..3686f50df268 100644 --- a/src/main/java/com/thealgorithms/datastructures/graphs/WelshPowell.java +++ b/src/main/java/com/thealgorithms/datastructures/graphs/WelshPowell.java @@ -98,7 +98,7 @@ private static int[] initializeColors(int numberOfVertices) { } private static Integer[] getSortedNodes(final Graph graph) { - return IntStream.range(0, graph.getNumVertices()).boxed().sorted(Comparator.comparingInt(v -> - graph.getAdjacencyList(v).size())).toArray(Integer[] ::new); + return IntStream.range(0, graph.getNumVertices()).boxed().sorted(Comparator.comparingInt(v -> -graph.getAdjacencyList(v).size())).toArray(Integer[] ::new); } private static boolean[] computeUsedColors(final Graph graph, final int vertex, final int[] colors) { diff --git a/src/main/java/com/thealgorithms/scheduling/PreemptivePriorityScheduling.java b/src/main/java/com/thealgorithms/scheduling/PreemptivePriorityScheduling.java index 9bcd5df81056..4cc404dcdb7b 100644 --- a/src/main/java/com/thealgorithms/scheduling/PreemptivePriorityScheduling.java +++ b/src/main/java/com/thealgorithms/scheduling/PreemptivePriorityScheduling.java @@ -29,7 +29,7 @@ private PreemptivePriorityScheduling() { } public static List preemptivePriorityScheduling(List processes) { List ganttChart = new ArrayList<>(); - PriorityQueue readyQueue = new PriorityQueue<>(Comparator.comparingInt(p -> - p.priority)); + PriorityQueue readyQueue = new PriorityQueue<>(Comparator.comparingInt(p -> -p.priority)); int currentTime = 0;