Getting wrong answer


getting wrong answer

hi @sp5513
Read the problem as a matrix of size M x N, rather than N x M as it helps in easy visualization.
In this manner,

  • A tile can be either place vertically,meaning it will only occupy a cell of width 1 and a complete hieght of M. Or,
  • You can place M tiles horizontally one over the other if there is enough width left.

refer this code -->

hi @sp5513
i hope its clear now??

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.