Question: IN JAVA ZERO ROWS & COLS Problem Description Assume you are given a checker board of size NxN which is filled with Os and 1s.


IN JAVA
ZERO ROWS & COLS Problem Description Assume you are given a checker board of size NxN which is filled with Os and 1s. Your task is to find the row(s) and column(s) with all zeros. For example, the following board of size 4x4, has all zeros in row 4, column 2 and column 4. Input The first line of input is a positive integer N (15N = 24) 1 010 which indicates the size of the board. The following N lines 1 0 1 0 contains the the data with N number of 0 / lin each line. 1000 0 000 Output The output should contain: *the row number with all the elements are zero, each in separate line and if there is no such row, print nothing. *the column number with all the elements are zero, each in separate line and if there is no such column, print nothing. Expected Output row 4. column 2 column 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
