سؤال

I have a container, of a certain width and height. I have a bunch of blocks that I need to fit in the container but I need to calculate the maximum size these blocks can be to fit.

For example:

enter image description here

to:

enter image description here

I guess its similar to this question but his code is jquery and applies to text. I would just like pseudocode or some form of algorithm of how to do this.

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top