aldsalkjf
This commit is contained in:
@@ -57,13 +57,15 @@ class Sudoku {
|
||||
for (int[] col : transposed)
|
||||
if (isRepetitive(col)) return false;
|
||||
|
||||
// Check there'ren't any repeats in a square.
|
||||
for (int i = 0; i < 9; i++) {
|
||||
int[] square = new int[3][3];
|
||||
for (int j = i; j < i + 3; j++) {
|
||||
// for (int k = i; k < i + 3; k++) { square[i][k] }
|
||||
}
|
||||
}
|
||||
/*
|
||||
// Check there'ren't any repeats in a square.
|
||||
for (int i = 0; i < 9; i++) {
|
||||
int[] square = new int[3][3];
|
||||
for (int j = i; j < i + 3; j++) {
|
||||
// for (int k = i; k < i + 3; k++) { square[i][k] }
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@@ -2,6 +2,33 @@ package bloom_filters;
|
||||
|
||||
import tester.Tester;
|
||||
|
||||
class Examples {
|
||||
void testTheThing(Tester t) { t.checkExpect(true, true); }
|
||||
class BitVec {
|
||||
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