Reading params
Greedy algorithm
Fixing greedy algorithm