Question: Examples: map = ' . UT ' ; ' . . . ' ; ' . X . ' ; ' C . G '
Examples:
map
UT;
;
X;
CG ;
directions
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
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
