+ 1
Independent Units in an Array
An array (let 20*20) inputs either B or W. Imagine the array to be the grids of a graph paper. B implies that grid (let 4*5) be black in colour and W means the grid is white in colour. The compiler categories each black grid as one unit. If multiple black grids occur adjacent to each other (only top bottom left and right)(diagonally not counted) , be it in the shape of rectangle or square or maybe T shaped, the complete structure is counted as one unit. So the program has to find how many such black independent units are there.
3 Respuestas
+ 1
Yash Gutgutia please don't expect people to code for you entirely...show your code and let people know where you are stuck...
+ 1
Yash Gutgutia it's okay... this is question answer section..only coding related question is to be asked here. if you wish, you can have this type of details on your activity feed or either you can submit assignment
0
Ketan Lalcheta Hi. Sorry I am new to the platform. I do not wish someone to solve it for me. Just that I found the problem interesting and wanted to share wid people.