Question d’entretien chez Amazon

two array based problems related to greedy and sorting and LFU cache implementation