Assume we are given a degree list $l=[1,3,3,7,8]$. And I would like to create a matrix out of this list in the following way. If (for example) we have that $[1,3,3,5]$, the matr