Box Stacking (GeeksforGeeks)
You are given a set of N types of rectangular 3-D boxes, where the ith box has height h, width w and length l. You task is to create a stack of boxes which is as tall as possible, but you can only stack a box on top of another box if the dimensions of the 2-D base of the lower box are each strictly larger than those of the 2-D base of the higher box. Of course, you can rotate a box so that any side functions as its base.It is also allowable to use multiple instances of the same type of box. You task is to complete the function maxHeight which returns the height of the highest possible stack so formed. Input: The first line of input contains an integer T denoting the no of test cases then T test cases follow . Each test case contains an integer N denoting the total no of boxes available. In the next line are 3*N space separated values denoting the height width and length of the N boxes. Output: For each test case in a new line output will be th...