tracks/dart/exercises/hamming/lib/example.dart in trackler-2.2.1.45 vs tracks/dart/exercises/hamming/lib/example.dart in trackler-2.2.1.46
- old
+ new
@@ -2,12 +2,12 @@
int compute(String a, String b) {
if (a.length != b.length) {
throw new ArgumentError("DNA strands must be of equal length.");
}
- var diff = 0;
+ int diff = 0;
- for (var i = 0; i < a.length; i++) {
+ for (int i = 0; i < a.length; i++) {
if (a[i] != b[i]) {
diff++;
}
}