Reported interview periodNot available
Zero rows and columns around each zero
Given a matrix, set every cell in a row or column that contains a zero to zero, deciding which rows and columns to clear from the original values rather than from the partially rewritten matrix.
Practice focusRequirements - Line 1 is rows cols . The next rows lines each hold cols integers. - For every cell that is 0 in the original matrix, its entire row and entire column become 0 . - Decide all affected rows and columns before writing any zeros, so zeros created by the update must not widen the cleared area. - Return the matrix with rows in their original order, values separated by single spaces and rows separated by newlines, with no extra text. - A matrix with no zeros is returned unchanged. - run case(case: dict) forwards case["stdin"] to solve .…