Cody

Problem 2158. Largest territory

Determine whose territory is largest. If there are multiple numbers tied for the largest territory, return the smallest number.

For example,

 X = 
 [ 1 1 2 2
   1 1 2 2
   2 2 2 2 ]
 y = 2

Solution Stats

75.0% Correct | 25.0% Incorrect
Last solution submitted on Jun 24, 2017
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!