easu c++ solution usinf stl lists
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n#include <list>\n\nclass FrontMiddleBackQueue {\npublic:\n    std::list<int> ml;\n\n    FrontMiddleBackQueue() {\n    }\n\n    void pushFront(int val) {\n        ml.push_front(val);\n    }\n\n    void pushMiddle(int val) {\n        std::list<int>::iterator it = ml.begin();\n        std::advance(it, ml.size() / 2);\n        ml.insert(it, val);\n    }\n\n    void pushBack(int val) {\n        ml.push_back(val);\n    }\n\n    int popFront() {\n        if (ml.empty()) {\n        return -1;\n    }\n        int ans = ml.front();\n        ml.pop_front();\n        return ans;\n    }\n\n    int popMiddle() {\n        if (ml.empty()) {\n        return -1;\n    }\n\n    list<int>::iterator it = ml.begin();\n    advance(it, ml.size() / 2);\n    if (ml.size() % 2 == 0) {\n        advance(it, -1);\n    }\n    int ans = *it;\n    ml.erase(it);\n    return ans;\n    }\n\n    int popBack() {\n        if (ml.empty()) {\n        return -1;\n    }\n        int ans = ml.back();\n        ml.pop_back();\n        return ans;\n    }\n};\n\n```
['Linked List', 'C++']