style: use proper spelling (#5436)

checkstyle: fix typos, style

Co-authored-by: alxkm <alx@alx.com>
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
This commit is contained in:
Alex Klymenko
2024-08-30 08:50:14 +02:00
committed by GitHub
parent d189c3a719
commit 87cf89192b
7 changed files with 18 additions and 19 deletions

View File

@ -11,7 +11,7 @@ public final class LargestRectangle {
private LargestRectangle() {
}
public static String largestRectanglehistogram(int[] heights) {
public static String largestRectangleHistogram(int[] heights) {
int n = heights.length;
int maxArea = 0;
Stack<int[]> st = new Stack<>();
@ -32,7 +32,7 @@ public final class LargestRectangle {
}
public static void main(String[] args) {
assert largestRectanglehistogram(new int[] {2, 1, 5, 6, 2, 3}).equals("10");
assert largestRectanglehistogram(new int[] {2, 4}).equals("4");
assert largestRectangleHistogram(new int[] {2, 1, 5, 6, 2, 3}).equals("10");
assert largestRectangleHistogram(new int[] {2, 4}).equals("4");
}
}