i dnt thnk it is gud to find the volume of the box,
becoz a best fit vol box may have higher length or hight or width,,,...
so LET JUST TRY MY IDEA,.
step1:
first get that which box is taken to be first
insert that
step2:
then select all the boxes which having
This is also called bin packing. This is a NP-(Hard) problem. There is
no good algorithm to find a solution. All the code you published here
a heuristics. Here is a good tutorial:
> http://www.developerfusion.com/article/5540/bin-packing/
On Sep 22, 9:12 am, vikas kumar wrote:
> you can search f
you can search for box stacking problem in google. There is a DP
method.
On Sep 22, 12:11 am, Dave wrote:
> Certainly having a smaller volume is necessary for a box to fit in
> another box, but it is not sufficient. E.g., a box of size 1 x 1 x 1
> will not fit in a box of size 2 x 2 x 1/2.
>
> Da
We can first sort the dimensions of each box.
For example if the dimensions of a box is L=10, B=12, W=6 then convert
it to L=12, B=10, W=6.
The above step is not needed if the problem states that L>B>H for all
boxes.
Then using a multi-key sorting we can sort all the boxes in ascending
order (or
Certainly having a smaller volume is necessary for a box to fit in
another box, but it is not sufficient. E.g., a box of size 1 x 1 x 1
will not fit in a box of size 2 x 2 x 1/2.
Dave
On Sep 21, 1:16 pm, rajess wrote:
> find the volume of boxes as v=l*b*h
> sort boxes in volumes in descending or
find the volume of boxes as v=l*b*h
sort boxes in volumes in descending order and this is the way to
insert boxes one into another
On Sep 21, 7:55 pm, Rashmi Shrivastava wrote:
> If there are n number of boxes and each with different dimensions and your
> job is to insert one box having lesser di