Some test cases are not passing

  1. A box can be placed on top of another box only if both width and depth of the upper placed box are smaller than width and depth of the lower box respectively.
  2. We can rotate boxes such that width is smaller than depth. For example, if there is a box with dimensions {1x2x3} where 1 is height, 2×3 is base, then there can be three possibilities, {1x2x3}, {2x1x3} and {3x1x2}
  3. We can use multiple instances of boxes. What it means is, we can have two different rotations of a box as part of our maximum height stack.

Here for your reference i am attaching the code

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.