C++ easy and concise solution
Happy Leetcoding !\n\n\nclass LUPrefix {\npublic:\n    set<int>st;\n    LUPrefix(int n) {\n        for(int i=1;i<=n+1;i++)\n        {\n            st.insert(i);
Happy Leetcoding !\n\n```\nclass LUPrefix {\npublic:\n    set<int>st;\n    LUPrefix(int n) {\n        for(int i=1;i<=n+1;i++)\n        {\n            st.insert(i);\n        }\n    }\n    \n    void upload(int video) {\n        st.erase(video);\n    }\n    \n    int longest() {\n       return (*st.begin())-1;\n    }\n};\n\n```
[]