Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 4Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started