1. Analyze the word finder with wild card characters scenario to form the algorithm and compute the time complexity. You are given a list of characters with size n, m. You need to read character data provided as input into this list. There is also a list of p words that you need to find in the given problem. You can only search in left, right, up and down direction from a position. There are two wild characters * and 4,if there is any instance of wild card characters for example '+' appears you can match whatever character in your word that you are searching at this position (only one character). Similarly, if you got wildcard *' you can skip any number of characters (A sequence of characters not necessary same in between the characters) but the last character should be matched in the given data. This means you are not allowed to match a first and last character with "** wildcard. Input: The first line of the input will give you two integers n and m. From the next line you will get the characters list from word-finder. The next line read an integer p that represents number of the words to be searched. From the next line you will read word per line. Output: In output you need to write the starting position ( x andy space separated) of the word that you find and direction of the match (Either L,R,U and D one character only). As you only need to allow Left, Right, Up and Down so your valid match will be for any such direction. If the word is not presented, you just need to write N (not find)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
1. Analyze the word finder with wild card characters scenario to form
the algorithm and compute the time complexity.
You are given a list of characters with size n, m. You need to read
character data provided as input into this list. There is also a list of p
words that you need to find in the given problem. You can only search
in left, right, up and down direction from a position. There are two wild
characters *' and '+' ,if there is any instance of wild card characters for
example '+' appears you can match whatever character in your word that
you are searching at this position (only one character). Similarly, if you
got wildcard *' you can skip any number of characters ( A sequence of
characters not necessary same in between the characters) but the last
character should be matched in the given data. This means you are not
allowed to match a first and last character with *' wildeard.
Input:
The first line of the input will give you two integers n and m. From the
next line you will get the characters list from word-finder. The next line
read an integer p that represents number of the words to be searched.
From the next line you will read word per line.
Output:
In output you need to write the starting position ( x and y space separated)
of the word that you find and direction of the match ( Either L,R,U and
D one character only). As you only need to allow Left, Right, Up and
Down so your valid match will be for any such direction. If the word is
not presented, you just need to write N (not find)
Transcribed Image Text:1. Analyze the word finder with wild card characters scenario to form the algorithm and compute the time complexity. You are given a list of characters with size n, m. You need to read character data provided as input into this list. There is also a list of p words that you need to find in the given problem. You can only search in left, right, up and down direction from a position. There are two wild characters *' and '+' ,if there is any instance of wild card characters for example '+' appears you can match whatever character in your word that you are searching at this position (only one character). Similarly, if you got wildcard *' you can skip any number of characters ( A sequence of characters not necessary same in between the characters) but the last character should be matched in the given data. This means you are not allowed to match a first and last character with *' wildeard. Input: The first line of the input will give you two integers n and m. From the next line you will get the characters list from word-finder. The next line read an integer p that represents number of the words to be searched. From the next line you will read word per line. Output: In output you need to write the starting position ( x and y space separated) of the word that you find and direction of the match ( Either L,R,U and D one character only). As you only need to allow Left, Right, Up and Down so your valid match will be for any such direction. If the word is not presented, you just need to write N (not find)
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY