Need to check Kmax > 0 before running greedy
Need to check Kmax > 0 before running greedy