Topological Sort Using Decrease And Crop Dimensions