Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Examples: map = ' . UT ' ; ' . . . ' ; ' . X . ' ; ' C . G '

Examples:
map=
'. UT';
'...' ;
'.X.';
'C.G' ;
'..']
directions =?'>V'
attractions =
['Crash';
'Tower';
'Giga!';
'Usurp']
[finalMap, route]= gtNightAtSixFlags (map, attractions,
direction)
") finalMap =
['';
'#;
'#X#',
'###',
'...']
" route =['I went to GT Night at Six Flags and rode Crash,
Giga!, Tower, Usurp!']
Notes:
Each attraction in the output string will be separated by a single comma and space
You will never cross over the same path previously traveled or travel outside of the
matrix dimensions
Do not replace the final location with a '#' but do replace the initial location with a
'#'
You only alter directions for the attractions you encounter on your path, there may be
extra characters you don't hit
There should not be a comma and space after the last attraction listed in the output
string
You are not guaranteed to visit every attraction, you might not visit any attractions
at all, in which case the outputted sentence would be: 'I went to GT Night at
Six Flags and rode !'
need code for matlab
image text in transcribed

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

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions

Question

What do Dimensions represent in OLAP Cubes?

Answered: 1 week ago