Skip to content

Commit d1b4c1e

Browse files
committed
Resolved Method Name Bug
1 parent 2660660 commit d1b4c1e

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/main/java/com/thealgorithms/ciphers/DES.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ private String[] getSubkeys(String originalKey) {
106106
return subKeys;
107107
}
108108

109-
private String XOR(String a, String b) {
109+
private String xOR(String a, String b) {
110110
int i;
111111
int l = a.length();
112112
StringBuilder xor = new StringBuilder();
@@ -143,7 +143,7 @@ private String feistel(String messageBlock, String key) {
143143
for (i = 0; i < 48; i++) {
144144
expandedKey.append(messageBlock.charAt(EXPANSION[i] - 1));
145145
}
146-
String mixedKey = XOR(expandedKey.toString(), key);
146+
String mixedKey = xOR(expandedKey.toString(), key);
147147
StringBuilder substitutedString = new StringBuilder();
148148

149149
// Let us now use the s-boxes to transform each 6 bit (length here) block to 4 bits
@@ -175,7 +175,7 @@ private String encryptBlock(String message, String[] keys) {
175175
// Iterate 16 times
176176
for (i = 0; i < 16; i++) {
177177
String eN = f0; // Previous Right block
178-
String fN = XOR(e0, feistel(f0, keys[i]));
178+
String fN = xOR(e0, feistel(f0, keys[i]));
179179
e0 = eN;
180180
f0 = fN;
181181
}

src/main/java/com/thealgorithms/dynamicprogramming/LongestIncreasingSubsequence.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ private static int upperBound(int[] ar, int l, int r, int key) {
2020
return r;
2121
}
2222

23-
public static int LIS(int[] array) {
23+
public static int lis(int[] array) {
2424
int len = array.length;
2525
if (len == 0) {
2626
return 0;

src/main/java/com/thealgorithms/searches/KMPSearch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class KMPSearch {
44

5-
int KMPSearch(String pat, String txt) {
5+
int kmpSearch(String pat, String txt) {
66
int m = pat.length();
77
int n = txt.length();
88

src/test/java/com/thealgorithms/divideandconquer/StrassenMatrixMultiplicationTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class StrassenMatrixMultiplicationTest {
1212
// and has to be a Square Matrix
1313

1414
@Test
15-
public void StrassenMatrixMultiplicationTest2x2() {
15+
public void strassenMatrixMultiplicationTest2x2() {
1616
int[][] a = {{1, 2}, {3, 4}};
1717
int[][] b = {{5, 6}, {7, 8}};
1818
int[][] expResult = {{19, 22}, {43, 50}};
@@ -21,7 +21,7 @@ public void StrassenMatrixMultiplicationTest2x2() {
2121
}
2222

2323
@Test
24-
void StrassenMatrixMultiplicationTest4x4() {
24+
void strassenMatrixMultiplicationTest4x4() {
2525
int[][] a = {{1, 2, 5, 4}, {9, 3, 0, 6}, {4, 6, 3, 1}, {0, 2, 0, 6}};
2626
int[][] b = {{1, 0, 4, 1}, {1, 2, 0, 2}, {0, 3, 1, 3}, {1, 8, 1, 2}};
2727
int[][] expResult = {{7, 51, 13, 28}, {18, 54, 42, 27}, {11, 29, 20, 27}, {8, 52, 6, 16}};
@@ -30,7 +30,7 @@ void StrassenMatrixMultiplicationTest4x4() {
3030
}
3131

3232
@Test
33-
void StrassenMatrixMultiplicationTestNegetiveNumber4x4() {
33+
void strassenMatrixMultiplicationTestNegetiveNumber4x4() {
3434
int[][] a = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}};
3535
int[][] b = {{1, -2, -3, 4}, {4, -3, -2, 1}, {5, -6, -7, 8}, {8, -7, -6, -5}};
3636
int[][] expResult = {{56, -54, -52, 10}, {128, -126, -124, 42}, {200, -198, -196, 74}, {272, -270, -268, 106}};

0 commit comments

Comments
 (0)