We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
For what it's worth: The author's solution uses high-level language features that overlook the gotchas of managing a dictionary of 100,000 entries.
For those of you playing along with C, it seems you must invoke an efficent sorting alogritm and an efficent searching algoritm - which are implied through the use of Map. Otherwise, your program will execute too slowly and timeout. I had success using the qsort() and bsearch() functions. If I maybe so bold, I would argue this is not an "easy" problem in the case of C.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 8: Dictionaries and Maps
You are viewing a single comment's thread. Return to all comments →
For what it's worth: The author's solution uses high-level language features that overlook the gotchas of managing a dictionary of 100,000 entries.
For those of you playing along with C, it seems you must invoke an efficent sorting alogritm and an efficent searching algoritm - which are implied through the use of Map. Otherwise, your program will execute too slowly and timeout. I had success using the qsort() and bsearch() functions. If I maybe so bold, I would argue this is not an "easy" problem in the case of C.