We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 82ab599 commit ba8b804Copy full SHA for ba8b804
CCSPiJ/src/chapter2/Gene.java
@@ -72,7 +72,7 @@ public boolean binaryContains(Codon key) {
72
int high = sortedCodons.size() - 1;
73
while (low <= high) { // while there is still a search space
74
int middle = (low + high) / 2;
75
- int comparison = codons.get(middle).compareTo(key);
+ int comparison = sortedCodons.get(middle).compareTo(key);
76
if (comparison < 0) { // middle codon is less than key
77
low = middle + 1;
78
} else if (comparison > 0) { // middle codon is greater than key
0 commit comments