Your solution must use a function called eraseObject recursively to perform the erasing. The function eraseObject is passed the array as an argument and row and column positions as arguments. If the row and column positions specify a position in a feature, that feature is removed by recursively calling eraseObject. If the row and column positions specify a position that is not in a feature, the eraseObject function just returns. Your solution must behave as shown in the example runs below.
Output is in boldface and input is italicized.
Both example runs are using the same input image. The only difference is the initial position specified. In the first run the position is in the feature, so the feature is erased. In the second run the position is not in the feature, so the feature is not erased. The top left corner position is row 0 and column 0.