Graph implementations and algorithms in C