Black and White Chess Problem

Given a 2D chessboard where black and white pieces are represented by characters 'B' and 'W', respectively, develop an algorithm to calculate the largest connected area of pieces of the same color. Pi...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: