We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
According to constraint n,m should lie between the floor and ceil.
In this case:
floor = 2;
ceil =3;
For minimum area, 2*4 should be choosen but it violates the constraints. i.e. column >ceil;
So we choose 3*3 to satisfy the condition.
Happy Coding :)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Encryption
You are viewing a single comment's thread. Return to all comments →
According to constraint n,m should lie between the floor and ceil. In this case: floor = 2; ceil =3; For minimum area, 2*4 should be choosen but it violates the constraints. i.e. column >ceil; So we choose 3*3 to satisfy the condition.
Happy Coding :)