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.
I got segmentation fault if I update the double linked-list by moving the hitted element into the front, but if I didn't update the double linked-list, the code pass all the test cases.
I don't know why. Isn't the LRUCache supposed to update the cache when hits?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Abstract Classes - Polymorphism
You are viewing a single comment's thread. Return to all comments →
I got segmentation fault if I update the double linked-list by moving the hitted element into the front, but if I didn't update the double linked-list, the code pass all the test cases. I don't know why. Isn't the LRUCache supposed to update the cache when hits?