Question: - Must be in Java - Must take the pattern and string from input.txt and also output the result to output.txt and also the terminal.

- Must be in Java - Must take the pattern and string from input.txt and also output the result to output.txt and also the terminal. - Must have a pattern that is normal and a pattern that is backwards

 - Must be in Java - Must take the pattern and

Make a string match program using a finite automata. However, you need to modify it so it finds the patter either forwards or backwards. The first word in the input file is the pattern (on its own line) The second word will be the string you are trying to match. Output all indexes where a match starts You may assume we will only put the normal 26 English letters in lower case for both the pattern and string. It is possible for a match to happen twice (if the pattern is symmetric). You should output the index of this match twice then. Assume indexes start from 0. Sample input file (all characters on a single line with no spaces between) abcc abccbabcc Corresponding sample output.txt file (spaces separating indexes (no space after final index): 0 2 5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!