Question d’entretien chez Affirm

Insert, Delete, GetRandom O(1) Leetcode medium question but in Hackerrank

Réponse à la question d'entretien

Utilisateur anonyme

28 avr. 2023

I managed to solve it by using a HashMap/Dictionary to store the customer ids and the associated merchant, then used a list to add/update as the functions were called, used the size of the list to get an index in the hashmap to return the merchant they wanted.