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.
Abstract Classes - Polymorphism
Abstract Classes - Polymorphism
Sort by
recency
|
313 Discussions
|
Please Login in order to post a comment
I have a shirt that says, "You're right. Let's do this the dumbest way possible". That's the way I'm starting to feel about all of this locked code. Using a linked list and a map was the absolute dumbest possible way to go about this. I refuse to play by those rules, and made up my own, and passed all the test cases without using the linked list at all.
Adding the issue of just plain bad setup code to terrible, unclear, incomplete instructions, and I'm realizing that this site is a complete shit show.
class LRUCache:public Cache { int cap; public: LRUCache(int capacity) { cp=capacity; cap=capacity; head=nullptr; tail=nullptr; } void set(int key,int value) { if(cap==0) { return; }
};
class LRUCache : public Cache { Node *ptr_bf{}; public: LRUCache(int capacity) { cp = capacity; tail = nullptr; head = nullptr; }
};