Algorithm For Graph Data Structure In C