Re: [algogeeks] Boxes!!!

2010-07-21 Thread Raj N
This question has already been discussed. My solution goes like this Constructing trees... Box 1 dim: 7,8,9 Make it as root1. The root also has a counter associated with it. Now count1=1. Then Box 2 dim: 5,6,8 7,8,9. Make it as a left child of root1 and count1=2. Box 3 dim: 5,8,7 doesn't fit in

Re: [algogeeks] Boxes!!!

2010-07-21 Thread Algoose chase
can we sort the boxes based on their volume in descending order and start highest volume box to lowest volume box (outer loop) -Inner loop start from lowest volume box to highest volume box upto the box considered in outer loop. Running time : O(n^2) On Tue, Jul 20, 2010 at 8:28 PM,

Re: [algogeeks] Boxes!!!

2010-07-20 Thread Ashish Goel
kindly give an example Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Tue, Jul 20, 2010 at 8:04 AM, siddharth shankar siddharth.shanka...@gmail.com wrote: step : 1. Sorting LBH in decreasing order first on L than on B and than on H .

Re: [algogeeks] Boxes!!!

2010-07-19 Thread siddharth shankar
step : 1. Sorting LBH in decreasing order first on L than on B and than on H . 2. Now find longest decreasing sub-sequence of array of structures(LBH) . correct me if I m wrong !!! On Sun, Jul 18, 2010 at 11:44 PM, amit amitjaspal...@gmail.com wrote: Given a lot of cuboid boxes with

[algogeeks] Boxes!!!

2010-07-18 Thread amit
Given a lot of cuboid boxes with different length, breadth and height. We need to find the maximum subset which can fit into each other. For example: If Box 1 has LBH as 7 8 9 If Box 2 has LBH as 5 6 8 If Box 3 has LBH as 5 8 7 If Box 4 has LBH as 4 4 4 then answer is 1,2,4 A box can fit into