Question: ======================================================================== Please write a recursive code to this Don't use any linear data structures, such as stack, queue, list, or vectors. ======================================================================== The researchers at

========================================================================

Please write a recursive code to this

Don't use any linear data structures, such as stack, queue, list, or vectors. ========================================================================

 ======================================================================== Please write a recursive code to this Don't use any

The researchers at a medical center wish they had taken a computer programming course way back when they were at medical school. These days, in addition to attending their research, they find themselves entangled with having to learn the R and Python languages in order to wrangle, visualize and model data collected from patients. 1,2 They simply have no time and no patience for R or Python! So they have decided to hire you as a programmer to assist, providing you with a bit of background information and a clear description of your task. The researchers have discovered that, when certain cells are introduced into a new environment, the cells quickly form colonies. To study the effectiveness of a drug they are developing, they need to figure out the size and number of the colonies in the environment. Fortunately, they can map the environment onto a grid of Os and 1s that might, for example, look something like this: 0 0 0 1 1 0 1 1 0 0 0 1 1 1 0 1 1 1 0 1 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 1 1 1 0 1 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 1 1 1 1 1 1 0 0 1 0 1 0 0 0 0 1 0 1 1 0 1 1 0 0 1 1 1 0 1 1 1 0 1 0 0 1 0 1 0 1 1 0 1 The locations on the grid each have a row and a column coordinates. A 1 or 0 at a location indicates, respectively, the presence or absence of a cell at that location. Colonies are formed by neighboring cells. Two cells are considered neighbors, if their locations are adjacent either horizontally, vertically, or diagonally. Thus, the maximum number of neighbors a cell can have is 3 for a corner cell, 5 for a cell on a single border, and 8 for a cell not on the borders. Given this background information, you are tasked with developing a ColonyExplorer program that explores and labels the colonies (if any). For example, using the grid above, your ColonyExplorer should produce the following information: AA - AA- B B B - ccc - c D - - - - - - - A - - - ccccc D - - A - - A A DDD - - A - A - E - CC D D D - A A A - F - - E -C- CC - C A: 14 B: 3 C: 20 D: 8 E: 2 F: 1 The information shows that there are six colonies labeled A, B, C, D, E, and F on the grid with size 14, 3, 20, 8, 2, and 1, respectively

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!