aldsalkjf
This commit is contained in:
@@ -57,6 +57,7 @@ class Sudoku {
|
|||||||
for (int[] col : transposed)
|
for (int[] col : transposed)
|
||||||
if (isRepetitive(col)) return false;
|
if (isRepetitive(col)) return false;
|
||||||
|
|
||||||
|
/*
|
||||||
// Check there'ren't any repeats in a square.
|
// Check there'ren't any repeats in a square.
|
||||||
for (int i = 0; i < 9; i++) {
|
for (int i = 0; i < 9; i++) {
|
||||||
int[] square = new int[3][3];
|
int[] square = new int[3][3];
|
||||||
@@ -64,6 +65,7 @@ class Sudoku {
|
|||||||
// for (int k = i; k < i + 3; k++) { square[i][k] }
|
// for (int k = i; k < i + 3; k++) { square[i][k] }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -2,6 +2,33 @@ package bloom_filters;
|
|||||||
|
|
||||||
import tester.Tester;
|
import tester.Tester;
|
||||||
|
|
||||||
class Examples {
|
class BitVec {
|
||||||
void testTheThing(Tester t) { t.checkExpect(true, true); }
|
boolean[] vec;
|
||||||
|
|
||||||
|
BitVec(int m) {
|
||||||
|
if (m < 0)
|
||||||
|
throw new IllegalArgumentException("Must be positive integer.");
|
||||||
|
|
||||||
|
this.vec = new boolean[m];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get the value of the ith bit.
|
||||||
|
boolean get(int i) { return this.vec[i]; }
|
||||||
|
|
||||||
|
// Set the value of the ith bit.
|
||||||
|
void set(int i, boolean v) { this.vec[i] = v; }
|
||||||
|
|
||||||
|
// Flip the ith bit.
|
||||||
|
void flip(int i) { this.vec[i] = !this.vec[i]; }
|
||||||
|
}
|
||||||
|
|
||||||
|
class Hash {
|
||||||
|
static
|
||||||
|
}
|
||||||
|
|
||||||
|
class Examples {
|
||||||
|
void testTheThing(Tester t) {
|
||||||
|
t.checkExpect(true, true);
|
||||||
|
t.checkExpect(false, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user