There are N equally sized elements that need to be displayed/fit in a 2D matrix(table).
Which size is the best when the number of elements is not a perfect square?
Is it better to choose the matrix that looks closest to a square (rectangle with smallest perimeter)?
Is it better to choose the matrix which has the least number of empty cells left?
Is it better to choose 'vertical' or 'horizontal' looking matrix when the height and length are different?
Example 1: Which representation is best for 7 elements?
X X X
X X X
X
or
X X X X
X X X
or
X X
X X
X X
X
Example 2: Which representation is best for 17 elements?
X X X X
X X X X
X X X X
X X X X
X
or
X X X X X
X X X X X
X X X X X
X X
or
X X X
X X X
X X X
X X X
X X X
X X
or
X X X X X X
X X X X X X
X X X X X
What is the best way to display the elements in the general case when N varies?