class Solution { private: int cap; map<int,int> mp; list<int> ls; public: Solution(int capacity){ cap = capacity; } void updateList(int key) { if (!mp[key]) { ls.push_front(key); } else { for(auto it = ls.begin();it!=ls.end();it++) { if (*it == key) { ls.erase(it); break; } } ls.push_fro...