Update Topological Ordering Algorithm Implementation