Nesting algorithms are used to make the most efficient use of material or space.
This could for instance be done by evaluating many different possible combinations via recursion.
[1]
This scientific software article is a stub.
You can help Wikipedia by expanding it.