C++ | Simple Solution Using one vector only
\nclass FrontMiddleBackQueue {\npublic:\n    vector<int> v;\n    FrontMiddleBackQueue() {\n        \n    }\n    \n    void pushFront(int val) {\n        v.inser
```\nclass FrontMiddleBackQueue {\npublic:\n    vector<int> v;\n    FrontMiddleBackQueue() {\n        \n    }\n    \n    void pushFront(int val) {\n        v.insert(v.begin(), val);\n    }\n    \n    void pushMiddle(int val) {\n        if(v.size() == 0) {\n            v.push_back(val);\n            return;\n        }\n        int pos = v.size()/2;\n        v.insert(v.begin()+pos, val);\n    }\n    \n    void pushBack(int val) {\n        v.push_back(val);\n    }\n    \n    int popFront() {\n        if(isEmpty()) return -1;\n        int front = v[0];\n        v.erase(v.begin());\n        return front;\n    }\n    \n    int popMiddle() {\n        if(isEmpty()) return -1;\n        int pos = v.size()/2;\n        if(v.size() % 2 == 0) pos -= 1; \n        int middle = v[pos];\n        v.erase(v.begin()+pos);\n        return middle;\n    }\n    \n    int popBack() {\n        if(isEmpty()) return -1;\n        int last = v.back();\n        int pos = v.size();\n        v.erase(v.begin()+pos-1);\n        return last;\n    }\n    bool isEmpty(){\n        return v.size() == 0;\n    }\n};\n\n```
['C', 'C++']