3 ms·
It is the exact same situation, though. Most people can just chain a sort and a binary search to do it, and both are included in most languages. Or just put it
by joaonmatos 4y ago
It is the exact same situation, though. Most people can just chain a sort and a binary search to do it, and both are included in most languages.
Or just put it into a tree map, if your language has it.