Amazon | Phone | Max count of type in 2D array
Anonymous User
1075

A warehouse can have either box tiles ('b') or floor tiles ('f'). Given a 2D matrix of warehouse setup, return max continuous box tile count.

Examples:

b b f
f b f
f f f

Answer: 3.

f f b
b b b
f f f

Answer: 4.

Same as Max Area of Island.

Comments (1)