Greedy Table Assignment Algorithm