Graph theory essential algorithms in C#