WC 8.3 LONGEST INCREASING SUBSEQUENCE PROBLEM

Statement : Consider x objects with dimensions (length, breadth and height) given. The objective is to stack the objects in order to achieve maximum height. But you can place an object on top of another object only if its base dimensions are strictly lower than the other object. Rotation of objects are allowed. Also, you can use multiple instances of the same box (i.e. consider the same box multiple times).

Example 1 :

Test case 1 : x=3
Dimensions (l,b,h)
Object 1 - (1,2,3)
Object 2 - (2,3,4)
Object 3 - (3,4,5)

Solution
Longest achievable height by stacking the boxes is 15
Stacking from top to bottom
1,2,3
2,3,4
3,4,5
4,5,3


Testcase :link

This challenge is worth 80 points.

You must be logged in to submit a solution

View ranklist for this challenge
About scoring and submission

Contact Us


Kunal Desai : 7715051136

Neelraj Patil : 9930671144



Privacy Policy