Topological Sort Using Decrease Size Of Image