i have a question to do with graph theory and i have the complete answer but im not sure how to do some of the steps.

the question is: determine whether the sequence below is graphical and, if so, find a graph having as its degree sequence:

: 5, 5, 4, 4, 3, 3, 3, 1, 0, 0

the answer is:

5 5 4 4 3 3 3 1 0 0

4 3 3 2 2 3 1 0 0

4 3 3 3 2 2 1 0 0

2 2 2 1 2 1 0 0

2 2 2 2 1 1 0 0

1 1 2 1 1 0 0

2 1 1 1 1 0 0

0 0 1 1 0 0

and then there are pictures of the graphs for each line, which i understand, but i dont understand the method of getting 5 5 4 4 3 3 3 1 0 0 to 0 0 1 1 0 0 ...can someone please explain this?