A circus is designing a tower routine consisting of people standing atop one another’s shoulders. For practical and aesthetic reasons, each person must be both shorter and light
You might need to say something about the weights & heights all being unique. Otherwise, if
A is (10, 10) // (w, h)
B is ( 9, 10)
C is ( 9, 8)
Then neither method gets the correct answer! C obviously can stand on A's shoulders.
Edit:
Neither method is good enough!
Example with all weights & heights unique:
A : (12, 12)
B : (11, 8)
C : (10, 9)
D : ( 9, 10)
E : ( 8, 11)
F : ( 7, 7)
Both methods give an answer of 2, however the tower can be at least of height 3 with several combinations:
I think stricter rules on the input data are needed to make this problem solvable by the given methods.