Question: (35 point) Given two 2D array of 0 with size N*N. There are some positions in the matrix that have value of These values of

  1. (35 point) Given two 2D array of 0 with size N*N. There are some positions in the matrix that have value of These values of 1 will create objects. Check which object has bigger Area (not circumference). If it has the same size print: object 1 and 2 has the same size

For example:

Input:

Matrix 1

0

0

1

0

0

0

1

0

1

0

0

0

1

0

0

0

0

0

0

0

0

0

0

0

0

Matrix 2

0

0

1

0

0

0

1

0

1

0

0

1

0

1

0

0

1

0

1

0

0

0

1

0

0

Output: object 2 is bigger

Input:

Matrix 1

0

1

1

1

0

0

1

0

1

0

0

1

0

1

0

0

1

1

1

0

0

0

0

0

0

Matrix 2

0

1

1

1

0

0

1

0

1

0

0

1

0

1

0

0

1

1

1

0

0

0

0

0

0

Output: object 1 and 2 has the same size

Use C languange with library and use the most simplest code. Please include pseudocode and flowchart

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!