Frage im Vorstellungsgespräch bei Rivian

Leetcode medium problem which can be solved using hashmap or heap sort