[contiguous-data/find-substr] Fix basic automata implementation
[contiguous-data/find-substr] Fix basic automata implementation

For test-case:
  input  : AAC
  pattern: AC

dubzzz/various-algorithms,dubzzz/various-algorithms