Initial commit with greedy algorithm and all permutations