Havel Hakimi Algorithm in C#