Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Data structure in java language 1. Analyze the word finder with wild card characters scenario to form the algorithm and compute the time complexity. You

Data structure

in java language

image text in transcribed

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 'V' 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 and y space separated) of the word that you find and direction of the match (Either L,RU 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)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David J. Auer

3rd Edition

0131986252, 978-0131986251

More Books

Students also viewed these Databases questions

Question

What do Dimensions represent in OLAP Cubes?

Answered: 1 week ago