Commit 7956a11
committed
fix a bug in shootout-reverse-complement, official tests should pass with it
In the "reverse-complement" loop, if there is an odd number of element,
we forget to complement the element in the middle. For example, if the
input is "ggg", the result before the fix is "CgC" instead of "CCC".
This is because of this bug that the official shootout says that the rust
version is in "Bad Output". This commit should fix this error.1 parent 33768c4 commit 7956a11
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
81 | | - | |
| 83 | + | |
82 | 84 | | |
0 commit comments