Skip to content

Commit 1757147

Browse files
committed
refactor: fix clang formatting issue
1 parent 12022a1 commit 1757147

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main/java/com/thealgorithms/stacks/LargestRectangle.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static String largestRectangleHistogram(int[] heights) {
3838
maxArea = Math.max(maxArea, popped[1] * (i - popped[0]));
3939
start = popped[0];
4040
}
41-
stack.push(new int[]{start, heights[i]});
41+
stack.push(new int[] {start, heights[i]});
4242
}
4343

4444
int totalLength = heights.length;

src/test/java/com/thealgorithms/stacks/LargestRectangleTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ void testLargestRectangleHistogram(int[] heights, String expected) {
1616
}
1717

1818
static Stream<Arguments> histogramProvider() {
19-
return Stream.of(Arguments.of(new int[]{2, 1, 5, 6, 2, 3}, "10"), Arguments.of(new int[]{2, 4}, "4"), Arguments.of(new int[]{4, 4, 4, 4}, "16"), Arguments.of(new int[]{}, "0"), Arguments.of(new int[]{5}, "5"), Arguments.of(new int[]{0, 0, 0}, "0"), Arguments.of(new int[]{6, 2, 5, 4, 5, 1, 6}, "12"), Arguments.of(new int[]{2, 1, 5, 6, 2, 3, 1}, "10"), Arguments.of(createLargeArray(10000, 1), "10000"));
19+
return Stream.of(Arguments.of(new int[] {2, 1, 5, 6, 2, 3}, "10"), Arguments.of(new int[] {2, 4}, "4"), Arguments.of(new int[] {4, 4, 4, 4}, "16"), Arguments.of(new int[] {}, "0"), Arguments.of(new int[] {5}, "5"), Arguments.of(new int[] {0, 0, 0}, "0"),
20+
Arguments.of(new int[] {6, 2, 5, 4, 5, 1, 6}, "12"), Arguments.of(new int[] {2, 1, 5, 6, 2, 3, 1}, "10"), Arguments.of(createLargeArray(10000, 1), "10000"));
2021
}
2122

2223
private static int[] createLargeArray(int size, int value) {

0 commit comments

Comments
 (0)