has two answers and the reason is simple, the OP was not clear about their O(1) requirement, see the update, mentioned it around one day later.
However, the first answer got the first down-vote since it was not answering to the question ( indicated by the down voter)
Both questions are valid and both have valid answers, however, the system shows only the last one.
If we can create a new question of the old version of the original question then move the old answer there without losing the points, it will be a nice solution. Can we do?