5 ms·
Why O(log n)? Is there a binary search involved somewhere (for example)? All you have got to do to find out how many people voted for it is to look at the vote
by rational_indian 14y ago
Why O(log n)? Is there a binary search involved somewhere (for example)? All you have got to do to find out how many people voted for it is to look at the vote count and this seems like an O(1) operation doesn't it?