Question: Matlab code Function Name: deepestPath Inputs: 1. (cell) A 1xN nested cell array Outputs 1. (char) A character vector describing the deepest path in the
Function Name: deepestPath Inputs: 1. (cell) A 1xN nested cell array Outputs 1. (char) A character vector describing the deepest path in the woods. Background Recursion just shook your entire world and sense of well being. You no longer can tell left from right, or a double from a char. To get a grip on reality, you decide to take a long, introspective walk into the depths of a nearby forest. You have several different path options and you are trying to decide which one will give you the longest path before you reach a dead end. You quickly realize the complexity of the situation, and you are about to give up when you find a map! Alas, a solution! The map you found is a map of nested cell arrays, and you immediately know what to do. Function Description: Write a recursive function that will search through a nested cell array to find the maximum depth of nested cells. Then output the string 'The deepest path is
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
