File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
main/java/com/thealgorithms/stacks
test/java/com/thealgorithms/stacks Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1313 */
1414public final class NearestElement {
1515 // Private constructor to prevent instantiation
16- private NearestElement () {}
16+ private NearestElement () {
17+ }
1718
1819 /** Finds the nearest greater element to the right for each element in the array. */
1920 public static int [] nearestGreaterToRight (int [] arr ) {
@@ -98,4 +99,4 @@ public static int[] nearestSmallerToLeft(int[] arr) {
9899
99100 return result ;
100101 }
101- }
102+ }
Original file line number Diff line number Diff line change @@ -58,4 +58,4 @@ void testNullInput() {
5858 assertThrows (IllegalArgumentException .class , () -> NearestElement .nearestSmallerToRight (null ));
5959 assertThrows (IllegalArgumentException .class , () -> NearestElement .nearestSmallerToLeft (null ));
6060 }
61- }
61+ }
You can’t perform that action at this time.
0 commit comments