Cody

Problem 2234. Find and replace the zero array in a matrix

Created by Essi in Community

Find the zero array in the matrix and replace it with average of surrounding (adjacent) arrays.

Example:

A =

     3     5     7    90     1
     5     1    -1     0     2
     1     2     3     4    70
    23     1     2     3     5

Output is:

B=23.75;

Solution Stats

44.44% Correct | 55.56% Incorrect
Last solution submitted on Sep 12, 2018

Problem Comments

Recent Solvers30

Suggested Problems

More from this Author2