mirror of
https://github.com/TheAlgorithms/Java.git
synced 2026-03-13 08:40:43 +08:00
@@ -5,14 +5,9 @@ import java.util.List;
|
||||
|
||||
public class HammingDistance {
|
||||
|
||||
public int getHammingDistanceBetweenBits(
|
||||
String senderBits,
|
||||
String receiverBits
|
||||
) {
|
||||
public int getHammingDistanceBetweenBits(String senderBits, String receiverBits) {
|
||||
if (senderBits.length() != receiverBits.length()) {
|
||||
throw new IllegalArgumentException(
|
||||
"Sender and Receiver bits should be same"
|
||||
);
|
||||
throw new IllegalArgumentException("Sender and Receiver bits should be same");
|
||||
}
|
||||
|
||||
List<byte[]> byteArray = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user