style: format code (#4212)

close #4204
This commit is contained in:
acbin
2023-06-09 18:52:05 +08:00
committed by GitHub
parent ad03086f54
commit 00282efd8b
521 changed files with 5233 additions and 7309 deletions

View File

@ -1,7 +1,7 @@
package com.thealgorithms.strings;
/* In information theory, the Hamming distance between two strings of equal length
is the number of positions at which the corresponding symbols are different.
/* In information theory, the Hamming distance between two strings of equal length
is the number of positions at which the corresponding symbols are different.
https://en.wikipedia.org/wiki/Hamming_distance
*/
public class HammingDistance {
@ -14,8 +14,7 @@ public class HammingDistance {
* @return {@code int} hamming distance
* @throws Exception
*/
public static int calculateHammingDistance(String s1, String s2)
throws Exception {
public static int calculateHammingDistance(String s1, String s2) throws Exception {
if (s1.length() != s2.length()) {
throw new Exception("String lengths must be equal");
}