|
|
@ -3,6 +3,12 @@ Algorithm test |
|
|
|
|
|
|
|
Nathan's version of BM search. |
|
|
|
|
|
|
|
Given the skeleton in place in the code, and its type annotations, fill in a simplified version of the BM search algorithm. |
|
|
|
|
|
|
|
It only returns the first occurrence of the pattern, and it only uses the "bad character" criteria from the algorithm. |
|
|
|
The lookup table is a sparse dictionary instead of a full alphabet like the C version. |
|
|
|
|
|
|
|
|
|
|
|
### Usage |
|
|
|
|
|
|
|
```bash |
|
|
|