Question d’entretien chez Bloomberg

How to implement a function in O(1) time