Some Graph Algorithm