easy implementation O(n) in vector || comments|| beginner friendly
\tclass LUPrefix {\n    private:\n    vector v;\n    int i;\n\tpublic:\n    LUPrefix(int n) {\n        v.resize(n+1);\n\t\t//take i from start\n        i=0;\n  
\tclass LUPrefix {\n    private:\n    vector<int> v;\n    int i;\n\tpublic:\n    LUPrefix(int n) {\n        v.resize(n+1);\n\t\t//take i from start\n        i=0;\n       // memset(v.begin(),v.end(),0);\n    }\n    \n    void upload(int video) {\n\t//upload it to the previous index so we can track it\n        v[video-1]=1;\n    }\n    \n    int longest() {\n\t// increase the index until we get the empty slot\n        while(v[i]==1){\n            i++;\n        }\n        return i;\n    }\n};
['Design', 'C']