Question 1: You are given many slabs each with a length and a breadth. A slab i can be put on slab j if both dimensions of i are less than that of j. In this similar manner, you can keep on putting slabs on each other. Find the maximum stack possible which you can create out of the given slabs.
Question 2: The above question was raised to 3 dimensions.
Question 3: The above question was then raised to k dimensions.
I believe we can apply dynamic programming to the above question.But
"A slab i can be put on slab j if both dimensions of i are less than that of j".
Not getting a clear idea on how to sort based on both the dimensions.