AKUNA CAPITAL interview question

2 Qs that use greedy algorithm