maxKills), the number of enemies killed in the current row (rowHits), and an array to store the number of enemies killed in each column (colHits).rowHits by scanning to the right until another wall or the end of the row.colHits value by scanning downwards until another wall or the end of the column.rowHits and the corresponding colHits value.maxKills if the total number of enemies killed is greater than the current maxKills.maxKills after iterating over all cells.