Greedy component placement algorithm