Pergunta de entrevista da empresa Affirm

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

Resposta da entrevista

Sigiloso

28 de abr. de 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.