Sort Items by Groups Respecting Dependencies
Keep each group together and every dependency first by topologically sorting groups, then items inside them.
Keep each group together and every dependency first by topologically sorting groups, then items inside them.