Gale Shapley algorithm for Algorithms