Skip to content

Commit b92bf89

Browse files
committed
style: Apply clang-format
1 parent 0681048 commit b92bf89

File tree

2 files changed

+47
-4
lines changed

2 files changed

+47
-4
lines changed

src/main/java/com/thealgorithms/sorts/SmoothSort.java

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,55 @@ public final class SmoothSort {
2121
/**
2222
* Private constructor to prevent instantiation of this utility class.
2323
*/
24-
private SmoothSort() {}
24+
private SmoothSort() {
25+
}
2526

2627
// Leonardo numbers: L(0)=1, L(1)=1, L(k+2)=L(k+1)+L(k)-1
2728
// We store pre-calculated Leonardo numbers up to a reasonable limit.
2829
private static final int[] LP = {
29-
1, 1, 3, 5, 9, 15, 25, 41, 67, 109, 177, 287, 465, 753, 1219, 1973, 3193, 5167, 8361, 13529, 21891, 35421, 57313, 92735, 150049, 242785, 392835, 635621, 1028457, 1664079, 2692537, 4356617, 7049155, 11405773, 18454929, 29860703, 48315633, 78176337, 126491971, 204668309, 331160281, 535828591, 866988873,
30+
1,
31+
1,
32+
3,
33+
5,
34+
9,
35+
15,
36+
25,
37+
41,
38+
67,
39+
109,
40+
177,
41+
287,
42+
465,
43+
753,
44+
1219,
45+
1973,
46+
3193,
47+
5167,
48+
8361,
49+
13529,
50+
21891,
51+
35421,
52+
57313,
53+
92735,
54+
150049,
55+
242785,
56+
392835,
57+
635621,
58+
1028457,
59+
1664079,
60+
2692537,
61+
4356617,
62+
7049155,
63+
11405773,
64+
18454929,
65+
29860703,
66+
48315633,
67+
78176337,
68+
126491971,
69+
204668309,
70+
331160281,
71+
535828591,
72+
866988873,
3073
};
3174

3275
/**
@@ -133,4 +176,4 @@ private static <T> void swap(T[] arr, int i, int j) {
133176
arr[i] = arr[j];
134177
arr[j] = temp;
135178
}
136-
}
179+
}

src/test/java/com/thealgorithms/sorts/SmoothSortTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ void testSortArrayWithNegativeNumbers() {
7979
SmoothSort.sort(array);
8080
assertArrayEquals(expected, array);
8181
}
82-
}
82+
}

0 commit comments

Comments
 (0)