AKUNA CAPITAL interview question

greedy algorithm