• + 1 comment

    I'm curious what you mean by sorted map here. Did you have to keep the keys sorted for some reason? Insertion and retrieval from most map implementions are supposed to be O(1) ( amortized, of course, since rehashing will happen ).

    I used Java's basic HashMap impl and passed in plenty of time. Java is not particularly fast, so a C map done correctly should have crushed this one.