One Liner functions using vectors O(n) solution
Explanation :\n1)    i(variable) stores the current index upto which video prefixes from 1 to i-1 are all uploades.\n2)   If a videos is uploaded while loop wil
Explanation :\n1)    i(variable) stores the current index upto which video prefixes from 1 to i-1 are all uploades.\n2)   If a videos is uploaded while loop will loop till it gets an unuploaded video \n3)   Since all values are being travel only once the time complextity will be O(n).\n\n```\nclass LUPrefix {\npublic:\n    int vec[100001]={0};\n    int i=1;\n    LUPrefix(int n) \n    {\n    }\n    void upload(int video) \n    {\n        vec[video]=1;\n        while(vec[i])i++;\n    }\n    \n    int longest() \n    {\n        return i-1;\n    }\n};\n/**\n * Your LUPrefix object will be instantiated and called as such:\n * LUPrefix* obj = new LUPrefix(n);\n * obj->upload(video);\n * int param_2 = obj->longest();\n */\n```
['Array', 'C']