[c++] easy using vector
\nclass FrontMiddleBackQueue {\nprivate:\n    vector<int>arr;    \npublic:\n    FrontMiddleBackQueue() {\n        \n    }\n    \n    void pushFront(int val) {\n
```\nclass FrontMiddleBackQueue {\nprivate:\n    vector<int>arr;    \npublic:\n    FrontMiddleBackQueue() {\n        \n    }\n    \n    void pushFront(int val) {\n        arr.insert(begin(arr),val);\n    }\n\n    void pushMiddle(int val) {\n        int mid = (arr.size())/2;\n        arr.insert(begin(arr)+mid,val); \n    }\n\n    void pushBack(int val) {\n        arr.push_back(val);\n    }\n    \n    int popFront() {\n        if(arr.size()==0)\n            return -1;\n        \n        int a=arr[0];\n        arr.erase(arr.begin());\n        return a;\n    }\n    \n    int popMiddle() {\n        if(arr.empty())\n            return -1;\n        int mid = (arr.size()-1)/2;\n        int a=arr[mid];\n        arr.erase(begin(arr)+mid);\n        return a;\n    }\n    \n    int popBack() {\n         if(arr.size()==0)\n            return -1;\n        int a=arr.back();\n        arr.pop_back();\n        return a;\n    }\n};\n```
[]