Question

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.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top