Question: Sequence Matching (25 points) **** THIS CODE SHOULD BE WRITTEN IN C ***** Sequence matching is a very interesting problem in various fields like genetics,

Sequence Matching (25 points)

**** THIS CODE SHOULD BE WRITTEN IN C *****

Sequence matching is a very interesting problem in various fields like genetics, cryptography etc. The main idea is that you are given a large sequence and a smaller sequence; you have to find whether the smaller sequence appears in any place of the large sequence. Write a program that performs this task. Your input would be 2 integers for array size and 2 integer arrays. Write a function that takes these 2 arrays as parameters and returns the index of the first occurrence of the smaller sequence in larger sequence. If no such match occurs, print proper message.

Sample Input and Output: (Your code should print the red texts on the screen. Black texts are sample user inputs)

Sequence Matching (25 points) **** THIS CODE SHOULD BE WRITTEN IN C

Sample Input Sample Output Match Found at index 3 Enter Size of A: 7 Enter A: 13 2 24 7 8 -90 Enter Size of B:3 Enter B: 7 8-9 Enter Size of A: 7 Enter A: 13 2 24 78-9 0 Enter B: 4 Enter Size of A: 7 890 No match found

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!